home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Controls / Visual Basic Controls.iso / vbcontrol / t2win-32 / t2win-32.bas < prev    next >
BASIC Source File  |  1998-07-13  |  144KB  |  2,178 lines

  1. Attribute VB_Name = "T2WIN_32_DEF"
  2. Option Explicit
  3.  
  4. ' Version : 5.52
  5.  
  6. ' object
  7.  
  8. ' definition for enum objects
  9.  
  10. Public Const ENUMOBJECTS_FORMAT1 = 1
  11. Public Const ENUMOBJECTS_FORMAT2 = 2
  12.  
  13. Declare Function cEnumObjects Lib "t2win-32.dll" (ByVal Frm As Form, ByVal NameIndexFormat As Integer, ByVal FirstNext As Integer, ObjectNameIndex As String, Obj As Object) As Integer
  14.  
  15. Declare Function cObjectGetBoolean Lib "t2win-32.dll" (ByVal Obj As Object, ByVal Property As String) As Boolean
  16. Declare Function cObjectGetByte Lib "t2win-32.dll" (ByVal Obj As Object, ByVal Property As String) As Byte
  17. Declare Function cObjectGetInteger Lib "t2win-32.dll" (ByVal Obj As Object, ByVal Property As String) As Integer
  18. Declare Function cObjectGetLong Lib "t2win-32.dll" (ByVal Obj As Object, ByVal Property As String) As Long
  19. Declare Function cObjectGetString Lib "t2win-32.dll" (ByVal Obj As Object, ByVal Property As String) As String
  20. Declare Function cObjectGetStringW Lib "t2win-32.dll" (ByVal Obj As Object, ByVal Property As String) As String
  21. Declare Function cObjectGetVariant Lib "t2win-32.dll" (ByVal Obj As Object, ByVal Property As String) As Variant
  22. Declare Function cObjectGetIndex Lib "t2win-32.dll" (ByVal Obj As Object) As Integer
  23.  
  24. Declare Function cGetObjCaption Lib "t2win-32.dll" (ByVal Obj As Object) As String
  25. Declare Function cGetObjContainer Lib "t2win-32.dll" (ByVal Obj As Object) As String
  26. Declare Function cGetObjParent Lib "t2win-32.dll" (ByVal Obj As Object) As String
  27. Declare Function cGetObjTag Lib "t2win-32.dll" (ByVal Obj As Object) As String
  28. Declare Function cGetObjText Lib "t2win-32.dll" (ByVal Obj As Object) As String
  29. Declare Function cGetObjDataField Lib "t2win-32.dll" (ByVal Obj As Object) As String
  30. Declare Function cGetObjDataSource Lib "t2win-32.dll" (ByVal Obj As Object) As String
  31. Declare Function cGetObjName Lib "t2win-32.dll" (ByVal Obj As Object) As String
  32. Declare Function cGetObjIndex Lib "t2win-32.dll" (ByVal Obj As Object) As Integer
  33. Declare Function cGetObjNameIndex Lib "t2win-32.dll" (ByVal Obj As Object) As String
  34. Declare Function cGetObjNameIndex2 Lib "t2win-32.dll" (ByVal Obj As Object) As String
  35. Declare Function cGetObjClassName Lib "t2win-32.dll" (ByVal Obj As Object) As String
  36.  
  37. Declare Sub cObjectPutBoolean Lib "t2win-32.dll" (ByVal Obj As Object, ByVal Property As String, ByVal Value As Boolean)
  38. Declare Sub cObjectPutByte Lib "t2win-32.dll" (ByVal Obj As Object, ByVal Property As String, ByVal Value As Byte)
  39. Declare Sub cObjectPutInteger Lib "t2win-32.dll" (ByVal Obj As Object, ByVal Property As String, ByVal Value As Integer)
  40. Declare Sub cObjectPutLong Lib "t2win-32.dll" (ByVal Obj As Object, ByVal Property As String, ByVal Value As Long)
  41. Declare Sub cObjectPutString Lib "t2win-32.dll" (ByVal Obj As Object, ByVal Property As String, ByVal Value As String)
  42. Declare Sub cObjectPutVariant Lib "t2win-32.dll" (ByVal Obj As Object, ByVal Property As String, ByVal Value As Variant)
  43.  
  44. Declare Sub cPutObjCaption Lib "t2win-32.dll" (ByVal Obj As Object, ByVal Value As String)
  45. Declare Sub cPutObjDataField Lib "t2win-32.dll" (ByVal Obj As Object, ByVal Value As String)
  46. Declare Sub cPutObjDataSource Lib "t2win-32.dll" (ByVal Obj As Object, ByVal Value As String)
  47. Declare Sub cPutObjTag Lib "t2win-32.dll" (ByVal Obj As Object, ByVal Value As String)
  48. Declare Sub cPutObjText Lib "t2win-32.dll" (ByVal Obj As Object, ByVal Value As String)
  49.  
  50. Declare Sub cObjectMethod Lib "t2win-32.dll" (ByVal Obj As Object, ByVal Method As String, ByVal Value As Variant)
  51.  
  52. Declare Sub cDisableFI Lib "t2win-32.dll" (ByVal Obj As Object)
  53. Declare Sub cEnableFI Lib "t2win-32.dll" (ByVal Obj As Object)
  54.  
  55. Declare Function cCloseAllEditForm Lib "t2win-32.dll" () As Integer
  56. Declare Function cHideAllEditForm Lib "t2win-32.dll" () As Integer
  57. Declare Function cHideDebugForm Lib "t2win-32.dll" () As Integer
  58. Declare Function cUnHideAllEditForm Lib "t2win-32.dll" () As Integer
  59. Declare Function cUnHideDebugForm Lib "t2win-32.dll" () As Integer
  60.  
  61. Declare Sub cEnableForm Lib "t2win-32.dll" (ByVal hWnd As Long)
  62. Declare Sub cEnableRedraw Lib "t2win-32.dll" (ByVal hWnd As Long)
  63. Declare Sub cObjEnableRedraw Lib "t2win-32.dll" (ByVal Obj As Object)
  64. Declare Sub cDisableForm Lib "t2win-32.dll" (ByVal hWnd As Long)
  65. Declare Sub cDisableRedraw Lib "t2win-32.dll" (ByVal hWnd As Long)
  66. Declare Sub cObjDisableRedraw Lib "t2win-32.dll" (ByVal Obj As Object)
  67.  
  68. Public Enum mcGradientGranularityEnum
  69.    mcDefault = 0
  70.    mcHigh = 1
  71.    mcMedium = 2
  72.    mcLow = 3
  73.    mcVeryLow = 4
  74. End Enum
  75.  
  76. Public Enum mcGradientStyleEnum
  77.    mcNoneGradient = 0
  78.    mcLeftHGradient = 1
  79.    mcRightHGradient = 2
  80.    mcTopVGradient = 3
  81.    mcBottomVGradient = 4
  82.    mcInnerHGradient = 5
  83.    mcOuterHGradient = 6
  84.    mcInnerVGradient = 7
  85.    mcOuterVGradient = 8
  86. End Enum
  87.  
  88. Declare Sub cGradient Lib "t2win-32.dll" (ByVal hDC As Long, ByVal iLeft As Integer, ByVal iTop As Integer, ByVal iWidth As Integer, ByVal iHeight As Integer, ByVal iGradientStyle As Integer, ByVal iGradientGranularity As Integer, ByVal lGradientColor As Long)
  89. Declare Sub cTitleGradient Lib "t2win-32.dll" (ByVal hWnd As Long, ByVal hIcon As Long, ByVal iGradientStyle As Integer, ByVal iGradientGranularity As Integer, ByVal lGradientColor As Long)
  90.  
  91. ' windows 95 / windows NT 4.00
  92.  
  93. ' definition for shortcut file
  94.  
  95. Public Const SHORTCUTFILE_GETPATH = 1
  96. Public Const SHORTCUTFILE_GETPATH83 = 2
  97. Public Const SHORTCUTFILE_GETWORKDIR = 3
  98. Public Const SHORTCUTFILE_GETDESCRIPTION = 4
  99. Public Const SHORTCUTFILE_GETARGUMENTS = 5
  100.  
  101. Public Const SHORTCUTFILE_SETPATH = -1
  102. Public Const SHORTCUTFILE_SETWORKDIR = -2
  103. Public Const SHORTCUTFILE_SETDESCRIPTION = -3
  104. Public Const SHORTCUTFILE_SETARGUMENTS = -4
  105.  
  106. ' structure for windows 95 memory
  107. Type tagMEMORYSTATUS
  108.    dwLength             As Long        'sizeof(MEMORYSTATUS)
  109.    dwMemoryLoad         As Long        'percent of memory in use
  110.    dwTotalPhys          As Long        'bytes of physical memory
  111.    dwAvailPhys          As Long        'free physical memory bytes
  112.    dwTotalPageFile      As Long        'bytes of paging file
  113.    dwAvailPageFile      As Long        'free bytes of paging file
  114.    dwTotalVirtual       As Long        'user bytes of address space
  115.    dwAvailVirtual       As Long        'free user bytes
  116. End Type
  117.  
  118. ' constant for tray bar
  119.  
  120. Public Const TRAYBAR_HIDE = -1
  121. Public Const TRAYBAR_SHOW = 0
  122.  
  123. ' constant for os platform id
  124.  
  125. Public Const VER_PLATFORM_WIN32s = 0
  126. Public Const VER_PLATFORM_WIN32_WINDOWS = 1
  127. Public Const VER_PLATFORM_WIN32_NT = 2
  128.  
  129. ' constant for ShortcutCreate
  130.  
  131. Public Const SC_DESKTOP = &H0
  132. Public Const SC_PROGRAMS = &H2
  133. Public Const SC_CONTROLS = &H3
  134. Public Const SC_PRINTERS = &H4
  135. Public Const SC_PERSONAL = &H5
  136. Public Const SC_FAVORITES = &H6
  137. Public Const SC_STARTUP = &H7
  138. Public Const SC_RECENT = &H8
  139. Public Const SC_SENDTO = &H9
  140. Public Const SC_BITBUCKET = &HA
  141. Public Const SC_STARTMENU = &HB
  142. Public Const SC_DESKTOPDIRECTORY = &H10
  143. Public Const SC_DRIVES = &H11
  144. Public Const SC_NETWORK = &H12
  145. Public Const SC_NETHOOD = &H13
  146. Public Const SC_FONTS = &H14
  147. Public Const SC_TEMPLATES = &H15
  148. Public Const SC_COMMON_STARTMENU = &H16
  149. Public Const SC_COMMON_PROGRAMS = &H17
  150. Public Const SC_COMMON_STARTUP = &H18
  151. Public Const SC_COMMON_DESKTOPDIRECTORY = &H19
  152. Public Const SC_APPDATA = &H1A
  153. Public Const SC_PRINTHOOD = &H1B
  154.  
  155. ' constant for RunFile
  156.  
  157. Public Const SW_HIDE = 0
  158. Public Const SW_SHOWNORMAL = 1
  159. Public Const SW_NORMAL = 1
  160. Public Const SW_SHOWMINIMIZED = 2
  161. Public Const SW_SHOWMAXIMIZED = 3
  162. Public Const SW_MAXIMIZE = 3
  163. Public Const SW_SHOWNOACTIVATE = 4
  164. Public Const SW_SHOW = 5
  165. Public Const SW_MINIMIZE = 6
  166. Public Const SW_SHOWMINNOACTIVE = 7
  167. Public Const SW_SHOWNA = 8
  168. Public Const SW_RESTORE = 9
  169. Public Const SW_SHOWDEFAULT = 10
  170. Public Const SW_MAX = 10
  171.  
  172. Declare Sub cExplorerAddToRecentDocs Lib "t2win-32.dll" (ByVal nFileName As String)
  173. Declare Sub cExplorerClearAllRecentDocs Lib "t2win-32.dll" ()
  174. Declare Sub cMemoryStatus Lib "t2win-32.dll" (MEMORYSTATUS As tagMEMORYSTATUS)
  175. Declare Sub cMultitasksKeys Lib "t2win-32.dll" (ByVal status As Integer)
  176. Declare Function cPBFileCopy Lib "t2win-32.dll" (ByVal hWndParent As Long, ByVal FileNameIn As String, ByVal FileNameOut As String) As Integer
  177. Declare Function cDBFileCopy Lib "t2win-32.dll" (ByVal Title As String, ByVal CaptionFrom As String, ByVal CaptionTo As String, ByVal CaptionButton As String, ByVal FileNameIn As String, ByVal FileNameOut As String) As Integer
  178. Declare Function cGetFileDisplayName Lib "t2win-32.dll" (ByVal nFileName As String) As String
  179. Declare Function cGetFileTypeName Lib "t2win-32.dll" (ByVal nFileName As String) As String
  180. Declare Function cGetOSBuildNumber Lib "t2win-32.dll" () As Long
  181. Declare Function cGetOSCSDVersion Lib "t2win-32.dll" () As String
  182. Declare Function cGetOSMajorVersion Lib "t2win-32.dll" () As Long
  183. Declare Function cGetOSMinorVersion Lib "t2win-32.dll" () As Long
  184. Declare Function cGetOSVersion Lib "t2win-32.dll" () As String
  185. Declare Function cGetOSPlatformId Lib "t2win-32.dll" () As Long
  186. Declare Function cGetOSPlatformName Lib "t2win-32.dll" () As String
  187. Declare Function cGetShortPathName Lib "t2win-32.dll" (ByVal sLongPath As String) As String
  188. Declare Function cIsCapsLockOn Lib "t2win-32.dll" () As Integer
  189. Declare Function cIsInsertOn Lib "t2win-32.dll" () As Integer
  190. Declare Function cIsNumLockOn Lib "t2win-32.dll" () As Integer
  191. Declare Function cIsScrollLockOn Lib "t2win-32.dll" () As Integer
  192. Declare Function cIsWin95OSR2 Lib "t2win-32.dll" () As Integer
  193. Declare Function cKillProcess Lib "t2win-32.dll" (ByVal hProcess As Long) As Integer
  194. Declare Function cMenuKillClose Lib "t2win-32.dll" (ByVal hWnd As Long) As Integer
  195. Declare Function cRunFile Lib "t2win-32.dll" (ByVal sFileName As String, ByVal sFileParameter As String, ByVal sFilePath As String, ByVal iRunStyle As Integer) As Long
  196. Declare Function cSetInsert Lib "t2win-32.dll" (ByVal iOnOff As Integer) As Integer
  197. Declare Function cSetCapsLock Lib "t2win-32.dll" (ByVal iOnOff As Integer) As Integer
  198. Declare Function cSetNumLock Lib "t2win-32.dll" (ByVal iOnOff As Integer) As Integer
  199. Declare Function cSetScrollLock Lib "t2win-32.dll" (ByVal iOnOff As Integer) As Integer
  200. Declare Function cShortcutCreate Lib "t2win-32.dll" (ByVal sFileName As String, ByVal sLinkName As String, ByVal lFolderType As Long) As Integer
  201. Declare Function cShortcutFileGetInfo Lib "t2win-32.dll" (ByVal pszShortcutFile As String, ByVal nFunction As Integer) As String
  202. Declare Function cShortcutFileGetArguments Lib "t2win-32.dll" (ByVal pszShortcutFile As String) As String
  203. Declare Function cShortcutFileGetIconLocation Lib "t2win-32.dll" (ByVal pszShortcutFile As String, lIconOffset As Long) As String
  204. Declare Function cShortcutFileGetDescription Lib "t2win-32.dll" (ByVal pszShortcutFile As String) As String
  205. Declare Function cShortcutFileGetPath Lib "t2win-32.dll" (ByVal pszShortcutFile As String) As String
  206. Declare Function cShortcutFileGetPath83 Lib "t2win-32.dll" (ByVal pszShortcutFile As String) As String
  207. Declare Function cShortcutFileGetWorkingDir Lib "t2win-32.dll" (ByVal pszShortcutFile As String) As String
  208. Declare Function cShortcutFileSetInfo Lib "t2win-32.dll" (ByVal pszShortcutFile As String, ByVal pszValue As String, ByVal nFunction As Integer) As Integer
  209. Declare Function cShortcutFileSetArguments Lib "t2win-32.dll" (ByVal pszShortcutFile As String, ByVal pszValue As String) As Integer
  210. Declare Function cShortcutFileSetDescription Lib "t2win-32.dll" (ByVal pszShortcutFile As String, ByVal pszValue As String) As Integer
  211. Declare Function cShortcutFileSetIconLocation Lib "t2win-32.dll" (ByVal pszShortcutFile As String, ByVal pszValue As String, ByVal lIconOffset As Long) As Integer
  212. Declare Function cShortcutFileSetPath Lib "t2win-32.dll" (ByVal pszShortcutFile As String, ByVal pszValue As String) As Integer
  213. Declare Function cShortcutFileSetWorkingDir Lib "t2win-32.dll" (ByVal pszShortcutFile As String, ByVal pszValue As String) As Integer
  214. Declare Function cTrashFile Lib "t2win-32.dll" (ByVal sFileName As String, ByVal iPermanent As Integer, ByVal iConfirm As Integer) As Integer
  215. Declare Sub cTrayBar Lib "t2win-32.dll" (ByVal HideOrShow As Integer)
  216.  
  217. ' file
  218.  
  219. ' definition for error type for ISFileNameVALID
  220. Public Const IFV_ERROR = 0
  221. Public Const IFV_NAME_TOO_LONG = 1
  222. Public Const IFV_EXT_TOO_LONG = 2
  223. Public Const IFV_TOO_MANY_BACKSLASH = 3
  224. Public Const IFV_BAD_DRIVE_LETTER = 4
  225. Public Const IFV_BAD_COLON_POS = 5
  226. Public Const IFV_EXT_WITHOUT_NAME = 6
  227.  
  228. ' definition for sFile attributes
  229. Public Const A_RDONLY = &H1             'Read only file
  230. Public Const A_HIDDEN = &H2             'Hidden file
  231. Public Const A_SYSTEM = &H4             'System file
  232. Public Const A_SUBDIR = &H10            'Subdirectory
  233. Public Const A_ARCHIVE = &H20           'Archive file
  234. Public Const A_NORMAL = &H80            'Normal sFile - No read/write restrictions
  235. Public Const A_COMPRESSED = &H800       'Compressed file
  236. Public Const A_NORMAL_ARCHIVE = &HFE    'Normal, Archive
  237. Public Const A_ALL = &HFF               'Normal, Archive, Read-Only, Hidden, System
  238.  
  239. ' definition for drive type
  240. Public Const DRIVE_UNKNOWN = 0
  241. Public Const DRIVE_NO_ROOT_DIR = 1
  242. Public Const DRIVE_REMOVABLE = 2
  243. Public Const DRIVE_FIXED = 3
  244. Public Const DRIVE_REMOTE = 4
  245. Public Const DRIVE_CDROM = 5
  246. Public Const DRIVE_RAMDISK = 6
  247.  
  248. '  definition for sFile sort
  249. Public Const SORT_ASCENDING = 1
  250. Public Const SORT_DESCENDING = 2
  251. Public Const SORT_CASE_SENSITIVE = 4
  252. Public Const SORT_CASE_INSENSITIVE = 8
  253.  
  254. ' definition for sFile I/O
  255. Public Const EOFILE = -1
  256. Public Const SEEK_CUR = 1
  257. Public Const SEEK_END = 2
  258. Public Const SEEK_SET = 0
  259.  
  260. ' definition for sFile uucp
  261. Public Const MODE_UUENCODE = 0
  262. Public Const MODE_UUDECODE = 1
  263.  
  264. ' definition for FilesCopy
  265. Public Const FC_OVERWRITE_EXISTING = 1
  266. Public Const FC_INCLUDE_SUB_DIRECTORY = 2
  267. Public Const FC_DONT_COPY_EMPTY_DIRECTORY = 4
  268. Public Const FC_DISPLAY_2_LINES = 8
  269.  
  270. ' definition for FilesMove
  271. Public Const FM_REPLACE_EXISTING = 1
  272. Public Const FM_INCLUDE_SUB_DIRECTORY = 2
  273. Public Const FM_DONT_COPY_EMPTY_DIRECTORY = 4
  274. Public Const FM_DISPLAY_2_LINES = 8
  275.  
  276. ' definition for error type for SplitFile
  277. Public Const SPLIT_BAD_PARTSIZE = -1
  278. Public Const SPLIT_BAD_SOURCE_FILENAME = -2
  279. Public Const SPLIT_BAD_TARGET_FILENAME = -3
  280. Public Const SPLIT_CANT_OPEN_SOURCE = -4
  281. Public Const SPLIT_CANT_CREATE_TARGET = -5
  282.  
  283. ' definition for error type for CutFile
  284. Public Const CUT_BAD_POSITION = -1
  285. Public Const CUT_BAD_SOURCE_FILENAME = -2
  286. Public Const CUT_BAD_TARGET1_FILENAME = -3
  287. Public Const CUT_BAD_TARGET2_FILENAME = -4
  288. Public Const CUT_POSITION_TOO_BIG = -5
  289. Public Const CUT_CANT_OPEN_SOURCE = -6
  290. Public Const CUT_CANT_CREATE_TARGET1 = -7
  291. Public Const CUT_CANT_CREATE_TARGET2 = -8
  292.  
  293. ' definition for error type for CopyFilePart
  294. Public Const COPY_BAD_POSITION = -1
  295. Public Const COPY_BAD_SOURCE_FILENAME = -2
  296. Public Const COPY_BAD_TARGET_FILENAME = -3
  297. Public Const COPY_POSITION_TOO_BIG = -4
  298. Public Const COPY_CANT_OPEN_SOURCE = -5
  299. Public Const COPY_CANT_CREATE_TARGET = -6
  300.  
  301. ' definition for error type for GetFileDateTime
  302. Public Const GET_FILE_DT_NO_ERROR = -1
  303. Public Const GET_FILE_DT_CANT_OPEN_FILE = 8
  304. Public Const GET_FILE_DT_CANT_GET_TIME = 9
  305. Public Const GET_FILE_DT_CANT_CNV_CREATION = 1
  306. Public Const GET_FILE_DT_CANT_CNV_LAST_ACCESS = 2
  307. Public Const GET_FILE_DT_CANT_CNV_LAST_WRITE = 4
  308.  
  309. ' definition for error type for SetFileDateTime
  310. Public Const SET_FILE_DT_NO_ERROR = -1
  311. Public Const SET_FILE_DT_CANT_OPEN_FILE = 8
  312. Public Const SET_FILE_DT_CANT_SET_TIME = 9
  313. Public Const SET_FILE_DT_CANT_CNV_CREATION = 1
  314. Public Const SET_FILE_DT_CANT_CNV_LAST_ACCESS = 2
  315. Public Const SET_FILE_DT_CANT_CNV_LAST_WRITE = 4
  316.  
  317. ' definition for error type for FileMergeExt
  318. Public Const FILE_MERGE_NO_ERROR = -1
  319. Public Const FILE_MERGE_EMPTY_TARGET_FILENAME = -2
  320. Public Const FILE_MERGE_EMPTY_BAD_TARGET_FILENAME = -3
  321. Public Const FILE_MERGE_CANT_SET_FILE_BUFFER = -4
  322. Public Const FILE_MERGE_CANT_CREATE_TARGET_FILE = -5
  323. Public Const FILE_MERGE_ERROR_READING_FILE = -6
  324. Public Const FILE_MERGE_ERROR_WRITING_FILE = -7
  325. Public Const FILE_MERGE_ERROR_BAD_WRITE = -8
  326. Public Const FILE_MERGE_BAD_FILE_AT_POSITION = -10
  327.  
  328. ' definition for error type for FileWrapLine
  329.  
  330. Public Const WRAP_SEPARATOR_IS_EMPTY = -1
  331. Public Const WRAP_EOL_IS_EMPTY = -2
  332. Public Const WRAP_BAD_LENGTH_OF_LINE = -3
  333. Public Const WRAP_CANT_INITIALIZE_IN_LINE_BUFFER = -4
  334. Public Const WRAP_CANT_INITIALIZE_OUT_LINE_BUFFER = -5
  335. Public Const WRAP_CANT_INITIALIZE_WORD_BUFFER = -6
  336. Public Const WRAP_CANT_INITIALIZE_BUFFER_1 = -7
  337. Public Const WRAP_CANT_OPEN_SOURCE = -8
  338. Public Const WRAP_CANT_CREATE_TARGET = -9
  339. Public Const WRAP_CANT_READ_LINE = -10
  340. Public Const WRAP_CANT_WRITE_LINE = -11
  341.  
  342. ' structure for sFile attributes
  343. Type FileAttributeType
  344.    ErrNo             As Integer
  345.    Archive           As Integer
  346.    Hidden            As Integer
  347.    Normal            As Integer
  348.    ReadOnly          As Integer
  349.    SubDir            As Integer
  350.    System            As Integer
  351.    Compressed        As Integer
  352. End Type
  353.  
  354. ' structure for split path
  355. Type tagSPLITPATH
  356.    nDrive            As String
  357.    nDir              As String
  358.    nName             As String
  359.    nExt              As String
  360. End Type
  361.  
  362. ' structure for GetFileDateTime & SetFileDateTime
  363. Type tagSYSTEMTIME
  364.    wYear             As Integer
  365.    wMonth            As Integer
  366.    wDayOfWeek        As Integer
  367.    wDay              As Integer
  368.    wHour             As Integer
  369.    wMinute           As Integer
  370.    wSecond           As Integer
  371.    wMilliseconds     As Integer
  372. End Type
  373.  
  374. Declare Function cAllSubDirectories Lib "t2win-32.dll" (ByVal lpBaseDirectory As String, nDir As Long) As String
  375. Declare Function cChDir Lib "t2win-32.dll" (ByVal lpDir As String) As Integer
  376. Declare Function cChDrive Lib "t2win-32.dll" (ByVal lpDrive As String) As Integer
  377. Declare Function cCmpFileAttribute Lib "t2win-32.dll" (ByVal File1 As String, ByVal File2 As String) As Integer
  378. Declare Function cCmpFileContents Lib "t2win-32.dll" (ByVal File1 As String, ByVal File2 As String, ByVal Sensitivity As Integer) As Integer
  379. Declare Function cCmpFileSize Lib "t2win-32.dll" (ByVal File1 As String, ByVal File2 As String) As Integer
  380. Declare Function cCmpFileTime Lib "t2win-32.dll" (ByVal File1 As String, ByVal File2 As String) As Integer
  381. Declare Function cCountDirectories Lib "t2win-32.dll" (ByVal lpFilename As String) As Integer
  382. Declare Function cCountFiles Lib "t2win-32.dll" (ByVal lpFilename As String) As Integer
  383. Declare Function cCutFile Lib "t2win-32.dll" (ByVal SourceFile As String, ByVal TargetFile1 As String, ByVal TargetFile2 As String, ByVal CutPosition As Long) As Long
  384. Declare Function cFileChangeChars Lib "t2win-32.dll" (ByVal nFileName As String, CharSet As String, NewCharSet As String, ByVal nFileTemp As String) As Long
  385. Declare Function cFileCompressTab Lib "t2win-32.dll" (ByVal File1 As String, ByVal File2 As String, ByVal nTab As Long) As Long
  386. Declare Function cFileCopy Lib "t2win-32.dll" (ByVal File1 As String, ByVal File2 As String) As Long
  387. Declare Function cFileCopy2 Lib "t2win-32.dll" (ByVal File1 As String, ByVal File2 As String) As Long
  388. Declare Function cFileDateCreated Lib "t2win-32.dll" (ByVal lpFilename As String) As String
  389. Declare Function cFileDrive Lib "t2win-32.dll" (ByVal lpFilename As String) As String
  390. Declare Function cFileExpandTab Lib "t2win-32.dll" (ByVal File1 As String, ByVal File2 As String, ByVal nTab As Long) As Long
  391. Declare Function cFileFilter Lib "t2win-32.dll" (ByVal File1 As String, ByVal File2 As String, Filter As String) As Long
  392. Declare Function cFileFilterNot Lib "t2win-32.dll" (ByVal File1 As String, ByVal File2 As String, Filter As String) As Long
  393. Declare Function cFileForceCopy Lib "t2win-32.dll" (ByVal File1 As String, ByVal File2 As String, ByVal ForceOrNot As Integer) As Long
  394. Declare Function cFileGetAttrib Lib "t2win-32.dll" (ByVal nFileName As String, nFileAttribute As Any) As Integer
  395. Declare Function cFileLastDateAccess Lib "t2win-32.dll" (ByVal lpFilename As String) As String
  396. Declare Function cFileLastDateModified Lib "t2win-32.dll" (ByVal lpFilename As String) As String
  397. Declare Function cFileLastTimeAccess Lib "t2win-32.dll" (ByVal lpFilename As String) As String
  398. Declare Function cFileLastTimeModified Lib "t2win-32.dll" (ByVal lpFilename As String) As String
  399. Declare Function cFileLineCount Lib "t2win-32.dll" (ByVal lpFilename As String) As Long
  400. Declare Function cFileLineCount2 Lib "t2win-32.dll" (ByVal lpFilename As String) As Long
  401. Declare Function cFileMerge Lib "t2win-32.dll" (ByVal File1 As String, ByVal File2 As String, ByVal FileTo As String) As Long
  402. Declare Function cFileMergeExt Lib "t2win-32.dll" (FileArray() As String, ByVal TargetFile As String) As Long
  403. Declare Function cFileMove Lib "t2win-32.dll" (ByVal File1 As String, ByVal File2 As String) As Long
  404. Declare Function cFilePartAppend Lib "t2win-32.dll" (ByVal SourceFile As String, ByVal TargetFile As String, ByVal Offset As Long, ByVal FirstPart As Integer) As Long
  405. Declare Function cFilePartCopy Lib "t2win-32.dll" (ByVal SourceFile As String, ByVal TargetFile As String, ByVal Offset As Long, ByVal FirstPart As Integer) As Long
  406. Declare Function cFilePathExists Lib "t2win-32.dll" (ByVal lpFilename As String) As Integer
  407. Declare Function cFileResetAllAttrib Lib "t2win-32.dll" (ByVal nFileName As String) As Integer
  408. Declare Function cFileResetArchive Lib "t2win-32.dll" (ByVal nFileName As String) As Integer
  409. Declare Function cFileResetFlag Lib "t2win-32.dll" (ByVal nFileName As String, ByVal nStatus As Integer) As Integer
  410. Declare Function cFileResetHidden Lib "t2win-32.dll" (ByVal nFileName As String) As Integer
  411. Declare Function cFileResetReadOnly Lib "t2win-32.dll" (ByVal nFileName As String) As Integer
  412. Declare Function cFileResetSystem Lib "t2win-32.dll" (ByVal nFileName As String) As Integer
  413. Declare Function cFileScanHeader Lib "t2win-32.dll" (ByVal nFileName As String, ByVal Search As String, ByVal FieldSep As String, StartLine As Long, ByVal Sensitivity As Integer) As String
  414. Declare Function cFileScanHeaderForRecipients Lib "t2win-32.dll" (ByVal nFileName As String, ByVal Search As String, ByVal FieldSep As String, ByVal ExtractOnlyAddress As Integer, ByVal ExtractAddressSep As String, StartLine As Long, ByVal Sensitivity As Integer) As String
  415. Declare Function cFileSearch Lib "t2win-32.dll" (ByVal nFileName As String, ByVal Search As String, ByVal Sensitivity As Integer) As Long
  416. Declare Function cFileSearchAndReplace Lib "t2win-32.dll" (ByVal nFileName As String, ByVal Search As String, ByVal Replace As String, ByVal nFileTemp As String, ByVal Sensitivity As Integer) As Long
  417. Declare Function cFileSearchCount Lib "t2win-32.dll" (ByVal nFileName As String, ByVal Search As String, ByVal Sensitivity As Integer) As Long
  418. Declare Function cFileSearchFromLine Lib "t2win-32.dll" (ByVal nFileName As String, ByVal Search As String, StartLine As Long, ByVal Sensitivity As Integer) As String
  419. Declare Function cFileSearchPatternFromLine Lib "t2win-32.dll" (ByVal nFileName As String, ByVal Search As String, StartLine As Long, ByVal Sensitivity As Integer) As String
  420. Declare Function cFileSetAllAttrib Lib "t2win-32.dll" (ByVal nFileName As String) As Integer
  421. Declare Function cFileSetArchive Lib "t2win-32.dll" (ByVal nFileName As String) As Integer
  422. Declare Function cFileSetAttrib Lib "t2win-32.dll" (ByVal nFileName As String, nFileAttribute As Any) As Integer
  423. Declare Function cFileSetFlag Lib "t2win-32.dll" (ByVal nFileName As String, ByVal nStatus As Integer) As Integer
  424. Declare Function cFileSetHidden Lib "t2win-32.dll" (ByVal nFileName As String) As Integer
  425. Declare Function cFileSetReadOnly Lib "t2win-32.dll" (ByVal nFileName As String) As Integer
  426. Declare Function cFileSetSystem Lib "t2win-32.dll" (ByVal nFileName As String) As Integer
  427. Declare Function cFileSize Lib "t2win-32.dll" (ByVal lpFilename As String) As Long
  428. Declare Function cFileSort Lib "t2win-32.dll" (ByVal FileIn As String, ByVal FileOut As String, ByVal SortMethod As Integer, ByVal RecordLength As Long, ByVal KeyOffset As Long, ByVal KeyLength As Long, rRecords As Long) As Long
  429. Declare Function cFileStatistics Lib "t2win-32.dll" (ByVal nFileName As String, nLines As Long, nWords As Long, nChars As Long) As Long
  430. Declare Function cFileTimeCreated Lib "t2win-32.dll" (ByVal lpFilename As String) As String
  431. Declare Function cFileToLower Lib "t2win-32.dll" (ByVal File1 As String, ByVal File2 As String) As Long
  432. Declare Function cFileToUpper Lib "t2win-32.dll" (ByVal File1 As String, ByVal File2 As String) As Long
  433. Declare Function cFileUUCP Lib "t2win-32.dll" (ByVal lpFilename1 As String, ByVal lpFilename2 As String, ByVal EncodeDecode As Integer, ByVal HeaderOrNot As Integer) As Long
  434. Declare Function cFilesCopy Lib "t2win-32.dll" (ByVal SourcePath As String, ByVal DestinationPath As String, ByVal CopyPattern As String, ByVal Flags As Integer) As Long
  435. Declare Function cFilesCopyExt Lib "t2win-32.dll" (ByVal Obj As Object, ByVal SourcePath As String, ByVal DestinationPath As String, ByVal CopyPattern As String, ByVal Flags As Integer) As Long
  436. Declare Function cFilesInDirOnDisk Lib "t2win-32.dll" (ByVal nFile As String, ByVal nFileName As String, ByVal nAttribute As Integer) As Integer
  437. Declare Function cFilesInDirToArray Lib "t2win-32.dll" (ByVal nFileName As String, ByVal nAttribute As Integer, FileArray() As String) As Integer
  438. Declare Function cFilesInDirectory Lib "t2win-32.dll" (ByVal nFileName As String, ByVal FirstNext As Integer) As String
  439. Declare Function cFilesMove Lib "t2win-32.dll" (ByVal SourcePath As String, ByVal DestinationPath As String, ByVal MovePattern As String, ByVal Flags As Integer) As Long
  440. Declare Function cFilesMoveExt Lib "t2win-32.dll" (ByVal Obj As Object, ByVal SourcePath As String, ByVal DestinationPath As String, ByVal CopyPattern As String, ByVal Flags As Integer) As Long
  441. Declare Function cFilesSize Lib "t2win-32.dll" (ByVal nFileName As String) As Double
  442. Declare Function cFilesSizeOnDisk Lib "t2win-32.dll" (ByVal nFileName As String) As Double
  443. Declare Function cFilesSlack Lib "t2win-32.dll" (ByVal nFileName As String, Size1 As Double, Size2 As Double) As Integer
  444. Declare Function cFileWrapLine Lib "t2win-32.dll" (ByVal sSourceFile As String, ByVal sTargetFile As String, ByVal Length As Long, ByVal Separator As String, ByVal EndOfLine As String) As Long
  445. Declare Function cFullPath Lib "t2win-32.dll" (ByVal nFileName As String) As String
  446. Declare Function cGetDiskClusterSize Lib "t2win-32.dll" (ByVal lpDrive As String) As Double
  447. Declare Function cGetDiskFree Lib "t2win-32.dll" (ByVal lpDrive As String) As Double
  448. Declare Function cGetDiskSpace Lib "t2win-32.dll" (ByVal lpDrive As String) As Double
  449. Declare Function cGetDiskUsed Lib "t2win-32.dll" (ByVal lpDrive As String) As Double
  450. Declare Function cGetDriveType Lib "t2win-32.dll" (ByVal lpDrive As String) As Integer
  451. Declare Function cGetFileDateTime Lib "t2win-32.dll" (ByVal nFileName As String, SysCreation As Any, SysLastAccess As Any, SysLastWrite As Any) As Integer
  452. Declare Function cIsFilenameValid Lib "t2win-32.dll" (ByVal nFileName As String) As Integer
  453. Declare Function cKillDir Lib "t2win-32.dll" (ByVal lpFilename As String) As Integer
  454. Declare Function cKillDirFilesAll Lib "t2win-32.dll" (ByVal lpDir As String, ByVal lpMask As String) As Integer
  455. Declare Function cKillDirs Lib "t2win-32.dll" (ByVal lpDir As String, ByVal HeaderDirectory As Integer) As Integer
  456. Declare Function cKillFile Lib "t2win-32.dll" (ByVal lpFilename As String) As Integer
  457. Declare Function cKillFileAll Lib "t2win-32.dll" (ByVal lpFilename As String) As Integer
  458. Declare Function cKillFiles Lib "t2win-32.dll" (ByVal lpFilename As String) As Integer
  459. Declare Function cKillFilesAll Lib "t2win-32.dll" (ByVal lpFilename As String) As Integer
  460. Declare Function cMakeDir Lib "t2win-32.dll" (ByVal lpFilename As String) As Integer
  461. Declare Function cMakeMultipleDir Lib "t2win-32.dll" (ByVal lpFilename As String) As Integer
  462. Declare Function cMakePath Lib "t2win-32.dll" (ByVal nDrive As String, ByVal nDir As String, ByVal nFileName As String, ByVal Ext As String) As String
  463. Declare Function cRcsCountFileDir Lib "t2win-32.dll" (ByVal FileOrDir As Integer, ByVal FirstFileOrDir As String, ByVal MaskDir As String, ByVal Recurse As Integer) As Long
  464. Declare Function cRcsFilesSize Lib "t2win-32.dll" (ByVal FirstDir As String, ByVal MaskDir As String, ByVal Recurse As Integer) As Double
  465. Declare Function cRcsFilesSizeOnDisk Lib "t2win-32.dll" (ByVal FirstDir As String, ByVal MaskDir As String, ByVal Recurse As Integer) As Double
  466. Declare Function cRcsFilesSlack Lib "t2win-32.dll" (ByVal FirstDir As String, ByVal MaskDir As String, ByVal Recurse As Integer, Size1 As Double, Size2 As Double) As Integer
  467. Declare Function cRenameFile Lib "t2win-32.dll" (ByVal lpFilename1 As String, ByVal lpFilename2 As String) As Integer
  468. Declare Function cSearchDir Lib "t2win-32.dll" (ByVal lpStartPath As String, ByVal lpFileMask As String, ByVal lpFileResult As String) As Long
  469. Declare Function cSearchFile Lib "t2win-32.dll" (ByVal lpStartPath As String, ByVal lpFileMask As String, ByVal lpFileResult As String) As Long
  470. Declare Function cSearchFileAttrib Lib "t2win-32.dll" (ByVal lpStartPath As String, ByVal lpFileMask As String, ByVal iSearchAttribute As Integer, ByVal lpFileResult As String) As Long
  471. Declare Function cSetFileDateTime Lib "t2win-32.dll" (ByVal nFileName As String, SysCreation As Any, SysLastAccess As Any, SysLastWrite As Any) As Integer
  472. Declare Function cSplitFile Lib "t2win-32.dll" (ByVal SourceFile As String, ByVal TargetFiles As String, ByVal PartSize As Long) As Long
  473. Declare Function cSplitPath Lib "t2win-32.dll" (ByVal nFileName As String, SPLITPATH As Any) As Integer
  474. Declare Function cSubDirectory Lib "t2win-32.dll" (ByVal nFileName As String, ByVal FirstNext As Integer) As String
  475. Declare Function cTruncatePath Lib "t2win-32.dll" (ByVal nFileName As String, ByVal NewLength As Long) As String
  476. Declare Function cUniqueFileName Lib "t2win-32.dll" (Text As String) As String
  477. Declare Function cWriteLogFile Lib "t2win-32.dll" (ByVal sSection As String, ByVal sEntry As String, ByVal sLogEntry As String, ByVal sLogFile As String) As Integer
  478.  
  479. ' binary
  480.  
  481. Declare Function cCreateBits Lib "t2win-32.dll" (ByVal nBits As Long) As String
  482. Declare Function cFindBitReset Lib "t2win-32.dll" (Text As String, ByVal Position As Long) As Long
  483. Declare Function cFindBitSet Lib "t2win-32.dll" (Text As String, ByVal Position As Long) As Long
  484. Declare Function cGetBit Lib "t2win-32.dll" (Text As String, ByVal Position As Long) As Integer
  485. Declare Function cGetBitB Lib "t2win-32.dll" (ByVal Value As Byte, ByVal Position As Integer) As Integer
  486. Declare Function cGetBitD Lib "t2win-32.dll" (ByVal Value As Double, ByVal Position As Integer) As Integer
  487. Declare Function cGetBitI Lib "t2win-32.dll" (ByVal Value As Integer, ByVal Position As Integer) As Integer
  488. Declare Function cGetBitL Lib "t2win-32.dll" (ByVal Value As Long, ByVal Position As Integer) As Integer
  489. Declare Function cGetBitS Lib "t2win-32.dll" (ByVal Value As Single, ByVal Position As Integer) As Integer
  490. Declare Function cGetBitB2 Lib "t2win-32.dll" (ByVal Value As Byte, ByVal Position As Integer) As Integer
  491. Declare Function cGetBitI2 Lib "t2win-32.dll" (ByVal Value As Integer, ByVal Position As Integer) As Integer
  492. Declare Function cGetBitL2 Lib "t2win-32.dll" (ByVal Value As Long, ByVal Position As Integer) As Integer
  493. Declare Function cGiveBitPalindrome Lib "t2win-32.dll" () As String
  494. Declare Function cIsBitPalindrome Lib "t2win-32.dll" (Text As String) As Integer
  495. Declare Sub cReverseAllBits Lib "t2win-32.dll" (Text As String)
  496. Declare Sub cReverseAllBitsByChar Lib "t2win-32.dll" (Text As String)
  497. Declare Sub cSetAllBits Lib "t2win-32.dll" (Text As String, ByVal Value As Integer)
  498. Declare Sub cSetBit Lib "t2win-32.dll" (Text As String, ByVal Position As Long, ByVal Value As Integer)
  499. Declare Sub cSetBitToFalse Lib "t2win-32.dll" (Text As String, ByVal Position As Long)
  500. Declare Sub cSetBitToTrue Lib "t2win-32.dll" (Text As String, ByVal Position As Long)
  501. Declare Sub cSetBitB Lib "t2win-32.dll" (Value As Byte, ByVal Position As Integer, ByVal BitValue As Integer)
  502. Declare Sub cSetBitD Lib "t2win-32.dll" (Value As Double, ByVal Position As Integer, ByVal BitValue As Integer)
  503. Declare Sub cSetBitI Lib "t2win-32.dll" (Value As Integer, ByVal Position As Integer, ByVal BitValue As Integer)
  504. Declare Sub cSetBitL Lib "t2win-32.dll" (Value As Long, ByVal Position As Integer, ByVal BitValue As Integer)
  505. Declare Sub cSetBitS Lib "t2win-32.dll" (Value As Single, ByVal Position As Integer, ByVal BitValue As Integer)
  506. Declare Sub cSetBitB2 Lib "t2win-32.dll" (Value As Byte, ByVal Position As Integer, ByVal BitValue As Integer)
  507. Declare Sub cSetBitI2 Lib "t2win-32.dll" (Value As Integer, ByVal Position As Integer, ByVal BitValue As Integer)
  508. Declare Sub cSetBitL2 Lib "t2win-32.dll" (Value As Long, ByVal Position As Integer, ByVal BitValue As Integer)
  509. Declare Sub cToggleAllBits Lib "t2win-32.dll" (Text As String)
  510. Declare Sub cToggleBit Lib "t2win-32.dll" (Text As String, ByVal Position As Long)
  511. Declare Function cB2I Lib "t2win-32.dll" (ByVal Text As String) As Integer
  512. Declare Function cB2L Lib "t2win-32.dll" (ByVal Text As String) As Long
  513. Declare Function cI2B Lib "t2win-32.dll" (ByVal Value As Integer) As String
  514. Declare Function cI2Bext Lib "t2win-32.dll" (ByVal Value As Integer, Bin As String) As String
  515. Declare Function cL2B Lib "t2win-32.dll" (ByVal Value As Long) As String
  516. Declare Function cL2Bext Lib "t2win-32.dll" (ByVal Value As Long, Bin As String) As String
  517. Declare Function cFromBinary Lib "t2win-32.dll" (Text As String) As String
  518. Declare Function cFromBinary2 Lib "t2win-32.dll" (Text As String, Bin As String) As String
  519. Declare Function cToBinary Lib "t2win-32.dll" (Text As String) As String
  520. Declare Function cToBinary2 Lib "t2win-32.dll" (Text As String, Bin As String) As String
  521.  
  522. ' compress
  523.  
  524. Public Const CMPEXP_FILEIN_CANT_BE_NULL = -1
  525. Public Const CMPEXP_FILEOUT_CANT_BE_NULL = -2
  526. Public Const CMPEXP_FILEIN_AND_FILEOUT_CANT_BE_THE_SAME = -3
  527. Public Const CMPEXP_FILEIN_CANT_BE_OPENED = -4
  528. Public Const CMPEXP_FILEOUT_CANT_BE_CREATED = -5
  529. Public Const CMPEXP_COMPRESS_OR_EXPAND_ERROR = -6
  530. Public Const CMPEXP_CANT_GET_FILEOUT_SIZE = -7
  531.  
  532. Declare Function cASHFileCompress Lib "t2win-32.dll" (ByVal File1 As String, ByVal File2 As String, ByVal order As Integer) As Long
  533. Declare Function cASHFileExpand Lib "t2win-32.dll" (ByVal File1 As String, ByVal File2 As String, ByVal order As Integer) As Long
  534. Declare Function cFileCompress Lib "t2win-32.dll" (ByVal File1 As String, ByVal File2 As String) As Long
  535. Declare Function cFileExpand Lib "t2win-32.dll" (ByVal File1 As String, ByVal File2 As String) As Long
  536. Declare Function cGZIPFileCompress Lib "t2win-32.dll" (ByVal File1 As String, ByVal File2 As String) As Long
  537. Declare Function cGZIPFileExpand Lib "t2win-32.dll" (ByVal File1 As String, ByVal File2 As String) As Long
  538. Declare Function cGZIPStringCompress Lib "t2win-32.dll" (Text As String) As String
  539. Declare Function cGZIPStringExpand Lib "t2win-32.dll" (Text As String) As String
  540. Declare Function cGZIPStringCompress2 Lib "t2win-32.dll" (Text As String) As String
  541. Declare Function cGZIPStringExpand2 Lib "t2win-32.dll" (Text As String) As String
  542. Declare Function cLZARIcompress Lib "t2win-32.dll" (ByVal File1 As String, ByVal File2 As String) As Long
  543. Declare Function cLZARIexpand Lib "t2win-32.dll" (ByVal File1 As String, ByVal File2 As String) As Long
  544. Declare Function cStringCompress Lib "t2win-32.dll" (Text As String) As String
  545. Declare Function cStringExpand Lib "t2win-32.dll" (Text As String) As String
  546.  
  547. ' timer
  548.  
  549. Declare Function cCheckWait Lib "t2win-32.dll" (ByVal nTimer As Integer) As Integer
  550. Declare Function cReadBasisTimer Lib "t2win-32.dll" () As Long
  551. Declare Function cReadTimer Lib "t2win-32.dll" (ByVal nTimer As Integer) As Long
  552. Declare Sub cSetWait Lib "t2win-32.dll" (ByVal nTimer As Integer, ByVal nValue As Long)
  553. Declare Function cSleep Lib "t2win-32.dll" (ByVal delay As Long) As Integer
  554. Declare Sub cStartBasisTimer Lib "t2win-32.dll" ()
  555. Declare Sub cStartTimer Lib "t2win-32.dll" (ByVal nTimer As Integer)
  556. Declare Sub cStartWait Lib "t2win-32.dll" (ByVal nTimer As Integer)
  557. Declare Sub cStopBasisTimer Lib "t2win-32.dll" ()
  558. Declare Function cStopTimer Lib "t2win-32.dll" (ByVal nTimer As Integer) As Long
  559. Declare Function cTimerClose Lib "t2win-32.dll" (ByVal TimerHandle As Integer) As Integer
  560. Declare Function cTimerOpen Lib "t2win-32.dll" () As Integer
  561. Declare Function cTimerRead Lib "t2win-32.dll" (ByVal TimerHandle As Integer) As Long
  562. Declare Function cTimerStart Lib "t2win-32.dll" (ByVal TimerHandle As Integer) As Integer
  563.  
  564. ' array
  565.  
  566. '  definition for array on disk
  567. Public Const PUT_ARRAY_ON_DISK = 0
  568. Public Const GET_ARRAY_ON_DISK = 1
  569.  
  570. '  definition for SortTypedArray
  571. '   success/error code
  572. Public Const ERR_STA_NO_ERROR = -1
  573. Public Const ERR_STA_NO_ITEMS_TO_SORT = 0
  574.  
  575. '   standard data type
  576. Public Const STA_BOOLEAN = 1                                   ' internal size = 2
  577. Public Const STA_BYTE = 2                                      ' internal size = 1
  578. Public Const STA_INTEGER = 3                                   ' internal size = 2
  579. Public Const STA_LONG = 4                                      ' internal size = 4
  580. Public Const STA_SINGLE = 5                                    ' internal size = 4
  581. Public Const STA_DOUBLE = 6                                    ' internal size = 8
  582. Public Const STA_CURRENCY = 7                                  ' internal size = 8
  583. Public Const STA_DATE = 8                                      ' internal size = 8
  584. Public Const STA_FIXSTRING_CI = 9                              ' internal size = * : fixed string length (case insensitive)
  585. Public Const STA_FIXSTRING_CS = 10                             ' internal size = * : fixed string length (case sensitive)
  586. Public Const STA_VARSTRING_CI = 11                             ' internal size = 4 : variable string length (case insensitive)
  587. Public Const STA_VARSTRING_CS = 12                             ' internal size = 4 : variable string length (case sensitive)
  588. Public Const STA_FIXSTRING_NUMBER = 13                         ' internal size = * : fixed string length (only number)
  589. Public Const STA_VARSTRING_NUMBER = 14                         ' internal size = 4 : variable string length (only number)
  590.  
  591. '   variant data type
  592. Public Const STA_VT_BOOLEAN = -STA_BOOLEAN                     ' internal size = 16
  593. Public Const STA_VT_BYTE = -STA_BYTE                           ' internal size = 16
  594. Public Const STA_VT_INTEGER = -STA_INTEGER                     ' internal size = 16
  595. Public Const STA_VT_LONG = -STA_LONG                           ' internal size = 16
  596. Public Const STA_VT_SINGLE = -STA_SINGLE                       ' internal size = 16
  597. Public Const STA_VT_DOUBLE = -STA_DOUBLE                       ' internal size = 16
  598. Public Const STA_VT_CURRENCY = -STA_CURRENCY                   ' internal size = 16
  599. Public Const STA_VT_DATE = -STA_DATE                           ' internal size = 16
  600. Public Const STA_VT_FIXSTRING_CI = -STA_VARSTRING_CI           ' internal size = 16
  601. Public Const STA_VT_FIXSTRING_CS = -STA_VARSTRING_CS           ' internal size = 16
  602. Public Const STA_VT_VARSTRING_CI = -STA_VARSTRING_CI           ' internal size = 16
  603. Public Const STA_VT_VARSTRING_CS = -STA_VARSTRING_CS           ' internal size = 16
  604. Public Const STA_VT_FIXSTRING_NUMBER = -STA_VARSTRING_NUMBER   ' internal size = 16
  605. Public Const STA_VT_VARSTRING_NUMBER = -STA_VARSTRING_NUMBER   ' internal size = 16
  606.  
  607. '  structure for VB array
  608. Type ArrayType
  609.    Bounds               As Long
  610.    LBound               As Integer
  611.    UBound               As Integer
  612.    ElemSize             As Integer
  613.    IndexCount           As Integer
  614.    TotalElem            As Integer
  615. End Type
  616.  
  617. '  structure for SortTypedArray
  618. Type tagCONFIGARRAY
  619.    RecordLength         As Long     ' internal use
  620.    ActualKey            As Integer  ' internal use
  621.    PreviousKey          As Integer  ' internal use
  622.    KeyOffset(1 To 10)   As Integer  ' 0 is the higher key, 10 is the lower key
  623.    KeyLength(1 To 10)   As Integer  ' length of the key (only for fixed string)
  624.    KeyType(1 To 10)     As Integer  ' type of the key (see standard/variant data type)
  625.    KeyOrder(1 To 10)    As Integer  ' -1 is reverse order, 0 is not used, 1 is ascending order
  626. End Type
  627.  
  628. Declare Function cAddD Lib "t2win-32.dll" (Darray() As Double, ByVal nValue As Double) As Integer
  629. Declare Function cAddI Lib "t2win-32.dll" (Iarray() As Integer, ByVal nValue As Integer) As Integer
  630. Declare Function cAddL Lib "t2win-32.dll" (Larray() As Long, ByVal nValue As Long) As Integer
  631. Declare Function cAddS Lib "t2win-32.dll" (Sarray() As Single, ByVal nValue As Single) As Integer
  632. Declare Function cArrayLookUp Lib "t2win-32.dll" (Strarray() As String, ByVal Value As String, ByVal Sensitivity As Integer) As String
  633. Declare Function cArrayOnDisk Lib "t2win-32.dll" (ByVal sFile As String, Tarray() As Any, ByVal GetPut As Integer) As Long
  634. Declare Function cArrayPrm Lib "t2win-32.dll" (Tarray() As Any, nArray As ArrayType) As Integer
  635. Declare Function cArrayStringOnDisk Lib "t2win-32.dll" (ByVal sFile As String, Strarray() As String, ByVal GetPut As Integer, rRecords As Long) As Long
  636. Declare Function cCountD Lib "t2win-32.dll" (Darray() As Double, ByVal Value As Double) As Long
  637. Declare Function cCountI Lib "t2win-32.dll" (Iarray() As Integer, ByVal Value As Integer) As Long
  638. Declare Function cCountL Lib "t2win-32.dll" (Larray() As Long, ByVal Value As Long) As Long
  639. Declare Function cCountS Lib "t2win-32.dll" (Sarray() As Single, ByVal Value As Single) As Long
  640. Declare Function cDeviationD Lib "t2win-32.dll" (Darray() As Double) As Double
  641. Declare Function cDeviationI Lib "t2win-32.dll" (Iarray() As Integer) As Double
  642. Declare Function cDeviationL Lib "t2win-32.dll" (Larray() As Long) As Double
  643. Declare Function cDeviationS Lib "t2win-32.dll" (Sarray() As Single) As Double
  644. Declare Function cFillD Lib "t2win-32.dll" (Darray() As Double, ByVal nValue As Double) As Integer
  645. Declare Function cFillI Lib "t2win-32.dll" (Iarray() As Integer, ByVal nValue As Integer) As Integer
  646. Declare Function cFillL Lib "t2win-32.dll" (Larray() As Long, ByVal nValue As Long) As Integer
  647. Declare Function cFillS Lib "t2win-32.dll" (Sarray() As Single, ByVal nValue As Single) As Integer
  648. Declare Function cFillIncrD Lib "t2win-32.dll" (Darray() As Double, ByVal nValue As Double, ByVal Increment As Double) As Integer
  649. Declare Function cFillIncrI Lib "t2win-32.dll" (Iarray() As Integer, ByVal nValue As Integer, ByVal Increment As Integer) As Integer
  650. Declare Function cFillIncrL Lib "t2win-32.dll" (Larray() As Long, ByVal nValue As Long, ByVal Increment As Long) As Integer
  651. Declare Function cFillIncrS Lib "t2win-32.dll" (Sarray() As Single, ByVal nValue As Single, ByVal Increment As Single) As Integer
  652. Declare Function cMaxD Lib "t2win-32.dll" (Darray() As Double) As Double
  653. Declare Function cMaxI Lib "t2win-32.dll" (Iarray() As Integer) As Integer
  654. Declare Function cMaxL Lib "t2win-32.dll" (Larray() As Long) As Long
  655. Declare Function cMaxS Lib "t2win-32.dll" (Sarray() As Single) As Single
  656. Declare Function cMaxNotXD Lib "t2win-32.dll" (Darray() As Double, ByVal ValueNotToReturn As Double) As Double
  657. Declare Function cMaxNotXI Lib "t2win-32.dll" (Iarray() As Integer, ByVal ValueNotToReturn As Integer) As Integer
  658. Declare Function cMaxNotXL Lib "t2win-32.dll" (Larray() As Long, ByVal ValueNotToReturn As Long) As Long
  659. Declare Function cMaxNotXS Lib "t2win-32.dll" (Sarray() As Single, ByVal ValueNotToReturn As Single) As Single
  660. Declare Function cMeanD Lib "t2win-32.dll" (Darray() As Double) As Double
  661. Declare Function cMeanI Lib "t2win-32.dll" (Iarray() As Integer) As Double
  662. Declare Function cMeanL Lib "t2win-32.dll" (Larray() As Long) As Double
  663. Declare Function cMeanS Lib "t2win-32.dll" (Sarray() As Single) As Double
  664. Declare Function cMinD Lib "t2win-32.dll" (Darray() As Double) As Double
  665. Declare Function cMinI Lib "t2win-32.dll" (Iarray() As Integer) As Integer
  666. Declare Function cMinL Lib "t2win-32.dll" (Larray() As Long) As Long
  667. Declare Function cMinS Lib "t2win-32.dll" (Sarray() As Single) As Single
  668. Declare Function cMinNotXD Lib "t2win-32.dll" (Darray() As Double, ByVal ValueNotToReturn As Double) As Double
  669. Declare Function cMinNotXI Lib "t2win-32.dll" (Iarray() As Integer, ByVal ValueNotToReturn As Integer) As Integer
  670. Declare Function cMinNotXL Lib "t2win-32.dll" (Larray() As Long, ByVal ValueNotToReturn As Long) As Long
  671. Declare Function cMinNotXS Lib "t2win-32.dll" (Sarray() As Single, ByVal ValueNotToReturn As Single) As Single
  672. Declare Function cReverseSortD Lib "t2win-32.dll" (Darray() As Double) As Integer
  673. Declare Function cReverseSortI Lib "t2win-32.dll" (Iarray() As Integer) As Integer
  674. Declare Function cReverseSortL Lib "t2win-32.dll" (Larray() As Long) As Integer
  675. Declare Function cReverseSortS Lib "t2win-32.dll" (Sarray() As Single) As Integer
  676. Declare Function cRmvDupD Lib "t2win-32.dll" (Darray() As Double, ByVal UseFileTemp As Integer, ByVal FileTemp As String, ByVal AutomaticResize As Integer) As Long
  677. Declare Function cRmvDupI Lib "t2win-32.dll" (Iarray() As Integer, ByVal UseFileTemp As Integer, ByVal FileTemp As String, ByVal AutomaticResize As Integer) As Long
  678. Declare Function cRmvDupL Lib "t2win-32.dll" (Larray() As Long, ByVal UseFileTemp As Integer, ByVal FileTemp As String, ByVal AutomaticResize As Integer) As Long
  679. Declare Function cRmvDupS Lib "t2win-32.dll" (Sarray() As Single, ByVal UseFileTemp As Integer, ByVal FileTemp As String, ByVal AutomaticResize As Integer) As Long
  680. Declare Function cSearchD Lib "t2win-32.dll" (Darray() As Double, ByVal Value As Double) As Long
  681. Declare Function cSearchI Lib "t2win-32.dll" (Iarray() As Integer, ByVal Value As Integer) As Long
  682. Declare Function cSearchL Lib "t2win-32.dll" (Larray() As Long, ByVal Value As Long) As Long
  683. Declare Function cSearchS Lib "t2win-32.dll" (Sarray() As Single, ByVal Value As Single) As Long
  684. Declare Function cSearchStr Lib "t2win-32.dll" (Strarray() As String, ByVal Value As String, ByVal Sensitivity As Integer) As Long
  685. Declare Function cSetD Lib "t2win-32.dll" (Darray() As Double, ByVal nValue As Double) As Integer
  686. Declare Function cSetI Lib "t2win-32.dll" (Iarray() As Integer, ByVal nValue As Integer) As Integer
  687. Declare Function cSetL Lib "t2win-32.dll" (Larray() As Long, ByVal nValue As Long) As Integer
  688. Declare Function cSetS Lib "t2win-32.dll" (Sarray() As Single, ByVal nValue As Single) As Integer
  689. Declare Function cShiftLeftB Lib "t2win-32.dll" (Barray() As Byte, ByVal nValue As Byte) As Integer
  690. Declare Function cShiftLeftD Lib "t2win-32.dll" (Darray() As Double, ByVal nValue As Double) As Integer
  691. Declare Function cShiftLeftI Lib "t2win-32.dll" (Iarray() As Integer, ByVal nValue As Integer) As Integer
  692. Declare Function cShiftLeftL Lib "t2win-32.dll" (Larray() As Long, ByVal nValue As Long) As Integer
  693. Declare Function cShiftLeftS Lib "t2win-32.dll" (Sarray() As Single, ByVal nValue As Single) As Integer
  694. Declare Function cShiftRightB Lib "t2win-32.dll" (Barray() As Byte, ByVal nValue As Byte) As Integer
  695. Declare Function cShiftRightD Lib "t2win-32.dll" (Darray() As Double, ByVal nValue As Double) As Integer
  696. Declare Function cShiftRightI Lib "t2win-32.dll" (Iarray() As Integer, ByVal nValue As Integer) As Integer
  697. Declare Function cShiftRightL Lib "t2win-32.dll" (Larray() As Long, ByVal nValue As Long) As Integer
  698. Declare Function cShiftRightS Lib "t2win-32.dll" (Sarray() As Single, ByVal nValue As Single) As Integer
  699. Declare Function cSortD Lib "t2win-32.dll" (Darray() As Double) As Integer
  700. Declare Function cSortI Lib "t2win-32.dll" (Iarray() As Integer) As Integer
  701. Declare Function cSortL Lib "t2win-32.dll" (Larray() As Long) As Integer
  702. Declare Function cSortS Lib "t2win-32.dll" (Sarray() As Single) As Integer
  703. Declare Function cSumD Lib "t2win-32.dll" (Darray() As Double) As Double
  704. Declare Function cSumI Lib "t2win-32.dll" (Iarray() As Integer) As Double
  705. Declare Function cSumL Lib "t2win-32.dll" (Larray() As Long) As Double
  706. Declare Function cSumS Lib "t2win-32.dll" (Sarray() As Single) As Double
  707. Declare Function cSortTypedArray Lib "t2win-32.dll" (TypedArray() As Any, ConfigArray As tagCONFIGARRAY) As Integer
  708.  
  709. ' ieeenum
  710.  
  711. Declare Function cCVB Lib "t2win-32.dll" (Value As String) As Byte
  712. Declare Function cCVC Lib "t2win-32.dll" (Value As String) As Currency
  713. Declare Function cCVD Lib "t2win-32.dll" (Value As String) As Double
  714. Declare Function cCVI Lib "t2win-32.dll" (Value As String) As Integer
  715. Declare Function cCVL Lib "t2win-32.dll" (Value As String) As Long
  716. Declare Function cCVS Lib "t2win-32.dll" (Value As String) As Single
  717. Declare Function cCVSMBF Lib "t2win-32.dll" (Value As String) As Single
  718. Declare Function cGetCVB Lib "t2win-32.dll" (Value As String, ByVal iPosition As Integer) As Byte
  719. Declare Function cGetCVC Lib "t2win-32.dll" (Value As String, ByVal iPosition As Integer) As Currency
  720. Declare Function cGetCVD Lib "t2win-32.dll" (Value As String, ByVal iPosition As Integer) As Double
  721. Declare Function cGetCVI Lib "t2win-32.dll" (Value As String, ByVal iPosition As Integer) As Integer
  722. Declare Function cGetCVL Lib "t2win-32.dll" (Value As String, ByVal iPosition As Integer) As Long
  723. Declare Function cGetCVS Lib "t2win-32.dll" (Value As String, ByVal iPosition As Integer) As Single
  724. Declare Function cMKB Lib "t2win-32.dll" (ByVal Value As Byte) As String
  725. Declare Function cMKC Lib "t2win-32.dll" (ByVal Value As Currency) As String
  726. Declare Function cMKD Lib "t2win-32.dll" (ByVal Value As Double) As String
  727. Declare Function cMKI Lib "t2win-32.dll" (ByVal Value As Integer) As String
  728. Declare Function cMKL Lib "t2win-32.dll" (ByVal Value As Long) As String
  729. Declare Function cMKN Lib "t2win-32.dll" (ByVal Value As String) As String
  730. Declare Function cMKS Lib "t2win-32.dll" (ByVal Value As Single) As String
  731. Declare Function cMKSMBF Lib "t2win-32.dll" (ByVal Value As Single) As String
  732. Declare Sub cPutMKB Lib "t2win-32.dll" (Value As String, ByVal iPosition As Integer, ByVal bValue As Byte)
  733. Declare Sub cPutMKC Lib "t2win-32.dll" (Value As String, ByVal iPosition As Integer, ByVal cValue As Currency)
  734. Declare Sub cPutMKD Lib "t2win-32.dll" (Value As String, ByVal iPosition As Integer, ByVal dValue As Double)
  735. Declare Sub cPutMKI Lib "t2win-32.dll" (Value As String, ByVal iPosition As Integer, ByVal iValue As Integer)
  736. Declare Sub cPutMKL Lib "t2win-32.dll" (Value As String, ByVal iPosition As Integer, ByVal lvalue As Long)
  737. Declare Sub cPutMKS Lib "t2win-32.dll" (Value As String, ByVal iPosition As Integer, ByVal sValue As Single)
  738. Declare Function cPutMKBs Lib "t2win-32.dll" (Value As String, ByVal iPosition As Integer, ByVal bValue As Byte) As String
  739. Declare Function cPutMKCs Lib "t2win-32.dll" (Value As String, ByVal iPosition As Integer, ByVal cValue As Currency) As String
  740. Declare Function cPutMKDs Lib "t2win-32.dll" (Value As String, ByVal iPosition As Integer, ByVal dValue As Double) As String
  741. Declare Function cPutMKIs Lib "t2win-32.dll" (Value As String, ByVal iPosition As Integer, ByVal iValue As Integer) As String
  742. Declare Function cPutMKLs Lib "t2win-32.dll" (Value As String, ByVal iPosition As Integer, ByVal lvalue As Long) As String
  743. Declare Function cPutMKSs Lib "t2win-32.dll" (Value As String, ByVal iPosition As Integer, ByVal sValue As Single) As String
  744.  
  745. ' disk array
  746.  
  747. '  structure for disk array
  748. Type tagDISKARRAY
  749.    daSize            As Integer           'size of the type'd
  750.    signature         As String * 7        'signature
  751.    nFileName         As String * 128      'name of the file
  752.    nType             As Integer           'variable type
  753.    nRows             As Long              'number of rows
  754.    nCols             As Long              'number of cols
  755.    nSheets           As Long              'number of sheets
  756.    rHandle           As Long              'returned handle for use with other functions
  757.    rElementSize      As Long              'returned size of a element
  758.    rFileSize         As Long              'returned size of the file
  759.    rParts            As Long              'returned total part
  760.    rRemain           As Long              'returned size of the remain part
  761.    rSheetSize        As Long              'size of a sheet
  762.    rOffset1          As Long              'returned offset 1
  763.    rOffset2          As Long              'returned offset 2
  764.    rTime             As Long              'time for the last correct transaction
  765.    nIsTyped          As Integer           'is nType a type'd variable
  766.    Dummy             As String * 7        'reserved for future use
  767. End Type
  768.  
  769. '  definition for variable type in DISK ARRAY
  770. Public Const DA_TYPE = 0
  771. Public Const DA_BYTE = -1
  772. Public Const DA_INTEGER = -2
  773. Public Const DA_LONG = -3
  774. Public Const DA_SINGLE = -4
  775. Public Const DA_DOUBLE = -5
  776. Public Const DA_CURRENCY = -6
  777.  
  778. '  definition for error type in DISK ARRAY
  779. Public Const DA_NO_ERROR = True
  780. Public Const DA_EMPTY_FILENAME = 1
  781. Public Const DA_BAD_FILENAME = 2
  782. Public Const DA_CAN_KILL_FILE = 3
  783. Public Const DA_CAN_NOT_OPEN_FILE = 4
  784. Public Const DA_FILE_NOT_FOUND = 5
  785. Public Const DA_BAD_TYPE = 6
  786. Public Const DA_BAD_ROWS = 7
  787. Public Const DA_BAD_COLS = 8
  788. Public Const DA_BAD_SHEETS = 9
  789. Public Const DA_CAN_NOT_WRITE_HEADER = 10
  790. Public Const DA_CAN_NOT_WRITE_PART = 11
  791. Public Const DA_CAN_NOT_WRITE_REMAIN = 12
  792. Public Const DA_CAN_NOT_READ_HEADER = 13
  793. Public Const DA_HEADER_SIZE = 14
  794. Public Const DA_BAD_SIGNATURE = 15
  795. Public Const DA_FILE_SIZE_MISMATCH = 16
  796. Public Const DA_CAN_NOT_SEEK = 17
  797. Public Const DA_INVALID_HANDLE = 18
  798. Public Const DA_CAN_NOT_READ_PART = 19
  799. Public Const DA_CAN_NOT_READ_REMAIN = 20
  800.  
  801. Declare Function cDAClear Lib "t2win-32.dll" (DISKARRAY As tagDISKARRAY) As Integer
  802. Declare Function cDAClearCol Lib "t2win-32.dll" (DISKARRAY As tagDISKARRAY, ByVal Col As Long, ByVal sheet As Long) As Integer
  803. Declare Function cDAClearRow Lib "t2win-32.dll" (DISKARRAY As tagDISKARRAY, ByVal Row As Long, ByVal sheet As Long) As Integer
  804. Declare Function cDAClearSheet Lib "t2win-32.dll" (DISKARRAY As tagDISKARRAY, ByVal sheet As Long) As Integer
  805. Declare Sub cDAClose Lib "t2win-32.dll" (DISKARRAY As tagDISKARRAY, ByVal DeleteFile As Integer)
  806. Declare Function cDACreate Lib "t2win-32.dll" (DISKARRAY As tagDISKARRAY, ByVal CreateOrUse As Integer) As Integer
  807. Declare Function cDAGet Lib "t2win-32.dll" (DISKARRAY As tagDISKARRAY, ByVal Row As Long, ByVal Col As Long, ByVal sheet As Long) As Variant
  808. Declare Sub cDAGetType Lib "t2win-32.dll" (DISKARRAY As tagDISKARRAY, ByVal Row As Long, ByVal Col As Long, ByVal sheet As Long, nType As Any)
  809. Declare Sub cDAPut Lib "t2win-32.dll" (DISKARRAY As tagDISKARRAY, ByVal Row As Long, ByVal Col As Long, ByVal sheet As Long, Var As Variant)
  810. Declare Sub cDAPutType Lib "t2win-32.dll" (DISKARRAY As tagDISKARRAY, ByVal Row As Long, ByVal Col As Long, ByVal sheet As Long, nType As Any)
  811. Declare Sub cDArGet Lib "t2win-32.dll" (DISKARRAY As tagDISKARRAY, ByVal Col As Long, Var As Variant)
  812. Declare Sub cDArGetType Lib "t2win-32.dll" (DISKARRAY As tagDISKARRAY, ByVal Col As Long, nType As Any)
  813. Declare Sub cDArPut Lib "t2win-32.dll" (DISKARRAY As tagDISKARRAY, ByVal Col As Long, Var As Variant)
  814. Declare Sub cDArPutType Lib "t2win-32.dll" (DISKARRAY As tagDISKARRAY, ByVal Col As Long, nType As Any)
  815. Declare Function cDAsClearCol Lib "t2win-32.dll" (DISKARRAY As tagDISKARRAY, ByVal Col As Long) As Integer
  816. Declare Function cDAsClearRow Lib "t2win-32.dll" (DISKARRAY As tagDISKARRAY, ByVal Row As Long) As Integer
  817. Declare Sub cDAsGet Lib "t2win-32.dll" (DISKARRAY As tagDISKARRAY, ByVal Row As Long, ByVal Col As Long, Var As Variant)
  818. Declare Sub cDAsGetType Lib "t2win-32.dll" (DISKARRAY As tagDISKARRAY, ByVal Row As Long, ByVal Col As Long, nType As Any)
  819. Declare Sub cDAsPut Lib "t2win-32.dll" (DISKARRAY As tagDISKARRAY, ByVal Row As Long, ByVal Col As Long, Var As Variant)
  820. Declare Sub cDAsPutType Lib "t2win-32.dll" (DISKARRAY As tagDISKARRAY, ByVal Row As Long, ByVal Col As Long, nType As Any)
  821.  
  822. ' huge memory array
  823.  
  824. '  structure for huge memory array
  825. Type tagHMA
  826.    daSize            As Integer           'size of the type'd
  827.    nType             As Integer           'variable type
  828.    nRows             As Long              'number of rows
  829.    nCols             As Long              'number of cols
  830.    nSheets           As Long              'number of sheets
  831.    rHandle           As Long              'returned handle for use with other functions
  832.    rElementSize      As Long              'returned size of a element
  833.    rMemorySize       As Long              'returned size of the memory used
  834.    rParts            As Long              'returned total part
  835.    rRemain           As Long              'returned size of the remain part
  836.    rSheetSize        As Long              'size of a sheet
  837.    rOffset           As Long              'returned offset
  838.    nIsTyped          As Integer           'is nType a type'd variable
  839.    Dummy             As String * 20       'reserved for future use
  840. End Type
  841.  
  842. '  definition for variable type in HUGE MEMORY ARRAY
  843. Public Const HMA_TYPE = 0
  844. Public Const HMA_BYTE = -1
  845. Public Const HMA_INTEGER = -2
  846. Public Const HMA_LONG = -3
  847. Public Const HMA_SINGLE = -4
  848. Public Const HMA_DOUBLE = -5
  849. Public Const HMA_CURRENCY = -6
  850.  
  851. '  definition for error type in HUGE MEMORY ARRAY
  852. Public Const HMA_NO_ERROR = True
  853. Public Const HMA_NO_MEMORY = 1
  854. Public Const HMA_BAD_TYPE = 2
  855. Public Const HMA_BAD_ROWS = 3
  856. Public Const HMA_BAD_COLS = 4
  857. Public Const HMA_BAD_SHEETS = 5
  858. Public Const HMA_INVALID_HANDLE = 6
  859.  
  860. Declare Function cHMAClear Lib "t2win-32.dll" (HMA As tagHMA) As Integer
  861. Declare Function cHMAClearCol Lib "t2win-32.dll" (HMA As tagHMA, ByVal Col As Long, ByVal sheet As Long) As Integer
  862. Declare Function cHMAClearRow Lib "t2win-32.dll" (HMA As tagHMA, ByVal Row As Long, ByVal sheet As Long) As Integer
  863. Declare Function cHMAClearSheet Lib "t2win-32.dll" (HMA As tagHMA, ByVal sheet As Long) As Integer
  864. Declare Function cHMACreate Lib "t2win-32.dll" (HMA As tagHMA) As Integer
  865. Declare Function cHMAFree Lib "t2win-32.dll" (HMA As tagHMA) As Integer
  866. Declare Function cHMAGet Lib "t2win-32.dll" (HMA As tagHMA, ByVal Row As Long, ByVal Col As Long, ByVal sheet As Long) As Variant
  867. Declare Sub cHMAGetType Lib "t2win-32.dll" (HMA As tagHMA, ByVal Row As Long, ByVal Col As Long, ByVal sheet As Long, nType As Any)
  868. Declare Sub cHMAPut Lib "t2win-32.dll" (HMA As tagHMA, ByVal Row As Long, ByVal Col As Long, ByVal sheet As Long, Var As Variant)
  869. Declare Sub cHMAPutType Lib "t2win-32.dll" (HMA As tagHMA, ByVal Row As Long, ByVal Col As Long, ByVal sheet As Long, nType As Any)
  870. Declare Sub cHMArGet Lib "t2win-32.dll" (HMA As tagHMA, ByVal Col As Long, Var As Variant)
  871. Declare Sub cHMArGetType Lib "t2win-32.dll" (HMA As tagHMA, ByVal Col As Long, nType As Any)
  872. Declare Sub cHMArPut Lib "t2win-32.dll" (HMA As tagHMA, ByVal Col As Long, Var As Variant)
  873. Declare Sub cHMArPutType Lib "t2win-32.dll" (HMA As tagHMA, ByVal Col As Long, nType As Any)
  874. Declare Sub cHMAsGet Lib "t2win-32.dll" (HMA As tagHMA, ByVal Row As Long, ByVal Col As Long, Var As Variant)
  875. Declare Sub cHMAsGetType Lib "t2win-32.dll" (HMA As tagHMA, ByVal Row As Long, ByVal Col As Long, nType As Any)
  876. Declare Sub cHMAsPut Lib "t2win-32.dll" (HMA As tagHMA, ByVal Row As Long, ByVal Col As Long, Var As Variant)
  877. Declare Sub cHMAsPutType Lib "t2win-32.dll" (HMA As tagHMA, ByVal Row As Long, ByVal Col As Long, nType As Any)
  878. Declare Function cHMAsClearCol Lib "t2win-32.dll" (HMA As tagHMA, ByVal Col As Long) As Integer
  879. Declare Function cHMAsClearRow Lib "t2win-32.dll" (HMA As tagHMA, ByVal Row As Long) As Integer
  880. Declare Function cHMAOnDisk Lib "t2win-32.dll" (HMA As tagHMA, ByVal hsFile As String, ByVal hsGetPut As Integer) As Long
  881.  
  882. '  structure for multiple disk array
  883. Type tagMULTIPLEDISKARRAY
  884.    daSize               As Integer        'size of the structure
  885.    signature            As String * 7     'signature
  886.    nFileName            As String * 128   'name of the file
  887.    nType(1 To 20)       As Integer        'standard variable type (for 20 arrays)
  888.    nIsTyped(1 To 20)    As Integer        'is a type'd (for 20 arrays)
  889.    nRows(1 To 20)       As Long           'number of rows (for 20 arrays)
  890.    nCols(1 To 20)       As Long           'number of cols (for 20 arrays)
  891.    nSheets(1 To 20)     As Long           'number of sheets (for 20 arrays)
  892.    rHandle              As Long           'returned handle for use with other functions
  893.    rFileSize            As Long           'returned size of the file
  894.    rElementSz(1 To 20)  As Long           'returned size of a element (for 20 arrays)
  895.    rSheetSz(1 To 20)    As Long           'size of a sheet (for 20 arrays)
  896.    rOffsetPos(1 To 20)  As Long           'position of each array in the sFile (for 20 arrays)
  897.    rOffset1             As Long           'returned offset 1
  898.    rOffset2             As Long           'returned offset 2
  899.    rTime                As Long           'time for the last correct transaction
  900.    Dummy                As String * 28    'reserved for future use
  901. End Type
  902.  
  903. '  definition for variable type in HUGE MEMORY ARRAY
  904. Public Const MDA_TYPE = 0
  905. Public Const MDA_BYTE = -1
  906. Public Const MDA_INTEGER = -2
  907. Public Const MDA_LONG = -3
  908. Public Const MDA_SINGLE = -4
  909. Public Const MDA_DOUBLE = -5
  910. Public Const MDA_CURRENCY = -6
  911.  
  912. '  definition for error type in MULTIPLE DISK ARRAY
  913. Public Const MDA_NO_ERROR = -1
  914. Public Const MDA_EMPTY_FileName = 1
  915. Public Const MDA_BAD_FileName = 2
  916. Public Const MDA_CAN_KILL_FILE = 3
  917. Public Const MDA_CAN_NOT_OPEN_FILE = 4
  918. Public Const MDA_FILE_NOT_FOUND = 5
  919. Public Const MDA_BAD_TYPE = 6
  920. Public Const MDA_BAD_ROWS = 7
  921. Public Const MDA_BAD_COLS = 8
  922. Public Const MDA_BAD_SHEETS = 9
  923. Public Const MDA_CAN_NOT_WRITE_HEADER = 10
  924. Public Const MDA_CAN_NOT_WRITE_PART = 11
  925. Public Const MDA_CAN_NOT_WRITE_REMAIN = 12
  926. Public Const MDA_CAN_NOT_READ_HEADER = 13
  927. Public Const MDA_HEADER_SIZE = 14
  928. Public Const MDA_BAD_SIGNATURE = 15
  929. Public Const MDA_FILE_SIZE_MISMATCH = 16
  930. Public Const MDA_CAN_NOT_SEEK = 17
  931. Public Const MDA_INVALID_HANDLE = 18
  932. Public Const MDA_CAN_NOT_READ_PART = 19
  933. Public Const MDA_CAN_NOT_READ_REMAIN = 20
  934. Public Const MDA_BAD_MULTIPLE_ARRAY = 21
  935.  
  936. Declare Function cMDAClear Lib "t2win-32.dll" (ByVal ArrayNum As Integer, MULTIPLEDISKARRAY As tagMULTIPLEDISKARRAY) As Integer
  937. Declare Function cMDAClearCol Lib "t2win-32.dll" (ByVal ArrayNum As Integer, MULTIPLEDISKARRAY As tagMULTIPLEDISKARRAY, ByVal Col As Long, ByVal sheet As Long) As Integer
  938. Declare Function cMDAClearRow Lib "t2win-32.dll" (ByVal ArrayNum As Integer, MULTIPLEDISKARRAY As tagMULTIPLEDISKARRAY, ByVal Row As Long, ByVal sheet As Long) As Integer
  939. Declare Function cMDAClearSheet Lib "t2win-32.dll" (ByVal ArrayNum As Integer, MULTIPLEDISKARRAY As tagMULTIPLEDISKARRAY, ByVal sheet As Long) As Integer
  940. Declare Sub cMDAClose Lib "t2win-32.dll" (MULTIPLEDISKARRAY As tagMULTIPLEDISKARRAY, ByVal DeleteFile As Integer)
  941. Declare Function cMDACreate Lib "t2win-32.dll" (MULTIPLEDISKARRAY As tagMULTIPLEDISKARRAY, ByVal CreateOrUse As Integer) As Integer
  942. Declare Function cMDAGet Lib "t2win-32.dll" (ByVal ArrayNum As Integer, MULTIPLEDISKARRAY As tagMULTIPLEDISKARRAY, ByVal Row As Long, ByVal Col As Long, ByVal sheet As Long) As Variant
  943. Declare Sub cMDAGetType Lib "t2win-32.dll" (ByVal ArrayNum As Integer, MULTIPLEDISKARRAY As tagMULTIPLEDISKARRAY, ByVal Row As Long, ByVal Col As Long, ByVal sheet As Long, nType As Any)
  944. Declare Sub cMDAPut Lib "t2win-32.dll" (ByVal ArrayNum As Integer, MULTIPLEDISKARRAY As tagMULTIPLEDISKARRAY, ByVal Row As Long, ByVal Col As Long, ByVal sheet As Long, Var As Variant)
  945. Declare Sub cMDAPutType Lib "t2win-32.dll" (ByVal ArrayNum As Integer, MULTIPLEDISKARRAY As tagMULTIPLEDISKARRAY, ByVal Row As Long, ByVal Col As Long, ByVal sheet As Long, nType As Any)
  946. Declare Sub cMDArGet Lib "t2win-32.dll" (ByVal ArrayNum As Integer, MULTIPLEDISKARRAY As tagMULTIPLEDISKARRAY, ByVal Col As Long, Var As Variant)
  947. Declare Sub cMDArGetType Lib "t2win-32.dll" (ByVal ArrayNum As Integer, MULTIPLEDISKARRAY As tagMULTIPLEDISKARRAY, ByVal Col As Long, nType As Any)
  948. Declare Sub cMDArPut Lib "t2win-32.dll" (ByVal ArrayNum As Integer, MULTIPLEDISKARRAY As tagMULTIPLEDISKARRAY, ByVal Col As Long, Var As Variant)
  949. Declare Sub cMDArPutType Lib "t2win-32.dll" (ByVal ArrayNum As Integer, MULTIPLEDISKARRAY As tagMULTIPLEDISKARRAY, ByVal Col As Long, nType As Any)
  950. Declare Function cMDAsClearCol Lib "t2win-32.dll" (ByVal ArrayNum As Integer, MULTIPLEDISKARRAY As tagMULTIPLEDISKARRAY, ByVal Col As Long) As Integer
  951. Declare Function cMDAsClearRow Lib "t2win-32.dll" (ByVal ArrayNum As Integer, MULTIPLEDISKARRAY As tagMULTIPLEDISKARRAY, ByVal Row As Long) As Integer
  952. Declare Sub cMDAsGet Lib "t2win-32.dll" (ByVal ArrayNum As Integer, MULTIPLEDISKARRAY As tagMULTIPLEDISKARRAY, ByVal Row As Long, ByVal Col As Long, Var As Variant)
  953. Declare Sub cMDAsGetType Lib "t2win-32.dll" (ByVal ArrayNum As Integer, MULTIPLEDISKARRAY As tagMULTIPLEDISKARRAY, ByVal Row As Long, ByVal Col As Long, nType As Any)
  954. Declare Sub cMDAsPut Lib "t2win-32.dll" (ByVal ArrayNum As Integer, MULTIPLEDISKARRAY As tagMULTIPLEDISKARRAY, ByVal Row As Long, ByVal Col As Long, Var As Variant)
  955. Declare Sub cMDAsPutType Lib "t2win-32.dll" (ByVal ArrayNum As Integer, MULTIPLEDISKARRAY As tagMULTIPLEDISKARRAY, ByVal Row As Long, ByVal Col As Long, nType As Any)
  956.  
  957. ' serialization
  958.  
  959. '  structure for serialization
  960. Type tagSERIALDATA
  961.    Description1      As String * 52       'serialization description 1
  962.    Description2      As String * 52       'serialization description 2
  963.    Number            As Long              'serialization number
  964.    Dummy             As String * 52       'reserved for future use
  965. End Type
  966.  
  967. '  definition for error type in SERIAL DATA
  968. Public Const SD_SERIAL_NOT_FOUND = 1
  969. Public Const SD_CAN_NOT_OPEN_FILE = 2
  970.  
  971. Declare Function cIsSerial Lib "t2win-32.dll" (ByVal sFile As String) As Integer
  972. Declare Function cSerialGet Lib "t2win-32.dll" (ByVal sFile As String, SERIALDATA As tagSERIALDATA) As Integer
  973. Declare Function cSerialInc Lib "t2win-32.dll" (ByVal sFile As String, ByVal Increment As Long) As Integer
  974. Declare Function cSerialPut Lib "t2win-32.dll" (ByVal sFile As String, SERIALDATA As tagSERIALDATA) As Integer
  975. Declare Function cSerialRmv Lib "t2win-32.dll" (ByVal sFile As String) As Integer
  976.  
  977. ' language control
  978.  
  979. '  definition for properties for language management
  980. Public Const RS_CAPTION = 1
  981. Public Const RS_TEXT = 2
  982. Public Const RS_DATAFIELD = 4
  983. Public Const RS_DATASOURCE = 8
  984. Public Const RS_TAG = 16
  985. Public Const RS_MENU = 32
  986. Public Const RS_ALL = 255
  987.  
  988. Declare Function cReadCtlLanguage Lib "t2win-32.dll" (ByVal Frm As Form, ByVal Property As Integer, ByVal FileLanguage As String) As Integer
  989. Declare Function cReadCtlLanguageExt Lib "t2win-32.dll" (ByVal Frm As Form, ByVal Property As Integer, ByVal FileLanguage As String) As Integer
  990. Declare Function cSaveCtlLanguage Lib "t2win-32.dll" (ByVal Frm As Form, ByVal Property As Integer, ByVal FileLanguage As String) As Integer
  991. Declare Function cSaveCtlLanguageExt Lib "t2win-32.dll" (ByVal Frm As Form, ByVal Property As Integer, ByVal FileLanguage As String) As Integer
  992.  
  993. ' interest rate
  994. Declare Function cAtoF Lib "t2win-32.dll" (ByVal Interest As Double, ByVal n As Integer) As Double
  995. Declare Function cAtoFC Lib "t2win-32.dll" (ByVal Rates As Double, ByVal n As Integer) As Double
  996. Declare Function cAtoP Lib "t2win-32.dll" (ByVal Interest As Double, ByVal n As Integer) As Double
  997. Declare Function cAtoPC Lib "t2win-32.dll" (ByVal Rates As Double, ByVal n As Integer) As Double
  998. Declare Function cFtoA Lib "t2win-32.dll" (ByVal Interest As Double, ByVal n As Integer) As Double
  999. Declare Function cFtoAC Lib "t2win-32.dll" (ByVal Rates As Double, ByVal n As Integer) As Double
  1000. Declare Function cFtoP Lib "t2win-32.dll" (ByVal Interest As Double, ByVal n As Integer) As Double
  1001. Declare Function cFtoPC Lib "t2win-32.dll" (ByVal Rates As Double, ByVal n As Integer) As Double
  1002. Declare Function cPtoA Lib "t2win-32.dll" (ByVal Interest As Double, ByVal n As Integer) As Double
  1003. Declare Function cPtoAC Lib "t2win-32.dll" (ByVal Rates As Double, ByVal n As Integer) As Double
  1004. Declare Function cPtoF Lib "t2win-32.dll" (ByVal Interest As Double, ByVal n As Integer) As Double
  1005. Declare Function cPtoFC Lib "t2win-32.dll" (ByVal Rates As Double, ByVal n As Integer) As Double
  1006.  
  1007. ' matrix
  1008.  
  1009. '  definition for matrix fill
  1010. Public Const MATRIX_ZERO = 0
  1011. Public Const MATRIX_UNIT = 1
  1012.  
  1013. Declare Sub cMatrixAdd Lib "t2win-32.dll" (ByVal Size As Integer, ArrayA() As Double, ArrayB() As Double, ArrayC() As Double)
  1014. Declare Function cMatrixCoFactor Lib "t2win-32.dll" (ByVal Size As Integer, ArrayA() As Double, ByVal Row As Integer, ByVal Col As Integer) As Double
  1015. Declare Function cMatrixCompare Lib "t2win-32.dll" (ByVal Size As Integer, ArrayA() As Double, ArrayC() As Double) As Integer
  1016. Declare Sub cMatrixCopy Lib "t2win-32.dll" (ByVal Size As Integer, ArrayA() As Double, ArrayC() As Double)
  1017. Declare Function cMatrixDet Lib "t2win-32.dll" (ByVal Size As Integer, ArrayA() As Double) As Double
  1018. Declare Function cMatrixFill Lib "t2win-32.dll" (ByVal Size As Integer, ArrayA() As Double, ByVal nInit As Integer) As Integer
  1019. Declare Function cMatrixInv Lib "t2win-32.dll" (ByVal Size As Integer, ArrayA() As Double, ArrayC() As Double) As Integer
  1020. Declare Function cMatrixMinor Lib "t2win-32.dll" (ByVal Size As Integer, ArrayA() As Double, ByVal Row As Integer, ByVal Col As Integer) As Double
  1021. Declare Sub cMatrixMul Lib "t2win-32.dll" (ByVal Size As Integer, ArrayA() As Double, ArrayB() As Double, ArrayC() As Double)
  1022. Declare Sub cMatrixSub Lib "t2win-32.dll" (ByVal Size As Integer, ArrayA() As Double, ArrayB() As Double, ArrayC() As Double)
  1023. Declare Function cMatrixSymToeplitz Lib "t2win-32.dll" (ByVal Size As Integer, ArrayA() As Double, ArrayC() As Double) As Integer
  1024. Declare Sub cMatrixTranspose Lib "t2win-32.dll" (ByVal Size As Integer, ArrayA() As Double, ArrayC() As Double)
  1025.  
  1026. ' is
  1027.  
  1028. Declare Function cIsAlnum Lib "t2win-32.dll" (Text As String) As Integer
  1029. Declare Function cIsAlpha Lib "t2win-32.dll" (Text As String) As Integer
  1030. Declare Function cIsAscii Lib "t2win-32.dll" (Text As String) As Integer
  1031. Declare Function cIsBalance Lib "t2win-32.dll" (ByVal nHour As Long, ByVal nMinute As Integer, ByVal nSecond As Integer) As Integer
  1032. Declare Function cIsCsym Lib "t2win-32.dll" (Text As String) As Integer
  1033. Declare Function cIsCsymf Lib "t2win-32.dll" (Text As String) As Integer
  1034. Declare Function cIsDate Lib "t2win-32.dll" (ByVal nYear As Integer, ByVal nMonth As Integer, ByVal nDay As Integer) As Integer
  1035. Declare Function cIsDigit Lib "t2win-32.dll" (Text As String) As Integer
  1036. Declare Function cIsFileArchive Lib "t2win-32.dll" (ByVal nFileName As String) As Integer
  1037. Declare Function cIsFileEmpty Lib "t2win-32.dll" (ByVal nFileName As String) As Integer
  1038. Declare Function cIsFileFlag Lib "t2win-32.dll" (ByVal nFileName As String, ByVal nStatus As Integer) As Integer
  1039. Declare Function cIsFileHidden Lib "t2win-32.dll" (ByVal nFileName As String) As Integer
  1040. Declare Function cIsFileNormal Lib "t2win-32.dll" (ByVal nFileName As String) As Integer
  1041. Declare Function cIsFileReadOnly Lib "t2win-32.dll" (ByVal nFileName As String) As Integer
  1042. Declare Function cIsFileSubDir Lib "t2win-32.dll" (ByVal nFileName As String) As Integer
  1043. Declare Function cIsFileSystem Lib "t2win-32.dll" (ByVal nFileName As String) As Integer
  1044. Declare Function cIsFileCompressed Lib "t2win-32.dll" (ByVal nFileName As String) As Integer
  1045. Declare Function cIsFormEnabled Lib "t2win-32.dll" (ByVal hWnd As Long) As Integer
  1046. Declare Function cIsHour Lib "t2win-32.dll" (ByVal nHour As Integer, ByVal nMinute As Integer, ByVal nSecond As Integer) As Integer
  1047. Declare Function cIsISBN Lib "t2win-32.dll" (Text As String) As Integer
  1048. Declare Function cIsLeapYear Lib "t2win-32.dll" (ByVal nYear As Integer) As Integer
  1049. Declare Function cIsLower Lib "t2win-32.dll" (Text As String) As Integer
  1050. Declare Function cIsPalindrome Lib "t2win-32.dll" (Text As String) As Integer
  1051. Declare Function cIsPrime Lib "t2win-32.dll" (ByVal Value As Long) As Integer
  1052. Declare Function cIsPunct Lib "t2win-32.dll" (Text As String) As Integer
  1053. Declare Function cIsSpace Lib "t2win-32.dll" (Text As String) As Integer
  1054. Declare Function cIsUpper Lib "t2win-32.dll" (Text As String) As Integer
  1055. Declare Function cIsXdigit Lib "t2win-32.dll" (Text As String) As Integer
  1056.  
  1057. ' encrypt/decrypt
  1058.  
  1059. '  definition for encrypt/decrypt
  1060. Public Const ENCRYPT_LEVEL_0 = 0
  1061. Public Const ENCRYPT_LEVEL_1 = 1
  1062. Public Const ENCRYPT_LEVEL_2 = 2
  1063. Public Const ENCRYPT_LEVEL_3 = 3
  1064. Public Const ENCRYPT_LEVEL_4 = 4
  1065.  
  1066. Declare Function cDecrypt Lib "t2win-32.dll" (Text As String, Password As String, ByVal Level As Integer) As String
  1067. Declare Function cEncrypt Lib "t2win-32.dll" (Text As String, Password As String, ByVal Level As Integer) As String
  1068. Declare Function cFileDecrypt Lib "t2win-32.dll" (ByVal File1 As String, ByVal File2 As String, Password As String, ByVal Level As Integer) As Long
  1069. Declare Function cFileEncrypt Lib "t2win-32.dll" (ByVal File1 As String, ByVal File2 As String, Password As String, ByVal Level As Integer) As Long
  1070.  
  1071. ' hicrypt
  1072.  
  1073. Declare Function cCrypt Lib "t2win-32.dll" (Text As String, ByVal Password As String) As String
  1074. Declare Function cFileCrypt Lib "t2win-32.dll" (ByVal File1 As String, ByVal File2 As String, ByVal Password As String) As Long
  1075.  
  1076. ' crc32
  1077.  
  1078. '  definition for crc32
  1079. Public Const OPEN_MODE_BINARY = 0
  1080. Public Const OPEN_MODE_TEXT = 1
  1081.  
  1082. Declare Function cFileCRC32 Lib "t2win-32.dll" (ByVal lpFilename As String, ByVal Mode As Integer) As Long
  1083. Declare Function cStringCRC32 Lib "t2win-32.dll" (Text As String) As Long
  1084.  
  1085. ' string
  1086.  
  1087. '  definition for error type for PATTERNMATCHEXT
  1088. Public Const MATCH_HEXA = 17
  1089. Public Const MATCH_INTERNAL_ERROR = 16
  1090. Public Const MATCH_PATTERN = 15
  1091. Public Const MATCH_LITERAL = 14
  1092. Public Const MATCH_RANGE = 13
  1093. Public Const MATCH_ABORT = 12
  1094. Public Const MATCH_END = 11
  1095. Public Const MATCH_VALID = -1
  1096.  
  1097. Public Const PATTERN_VALID = 0
  1098. Public Const PATTERN_INVALID = 1
  1099. Public Const PATTERN_ESC = 2
  1100. Public Const PATTERN_RANGE = 3
  1101. Public Const PATTERN_CLOSE = 4
  1102. Public Const PATTERN_EMPTY = 5
  1103. Public Const PATTERN_INTERNAL_ERROR = 6
  1104. Public Const PATTERN_HEXA = 7
  1105.  
  1106. ' definition for PROPERNAME2
  1107. Public Const PN_UPPERCASE = 1
  1108. Public Const PN_PUNCTUATION = 2
  1109. Public Const PN_KEEP_ORIGINAL = 4
  1110. Public Const PN_ONLY_LEADER_SPACE = 8
  1111.  
  1112. ' definition for EXTRACTISOLATE
  1113. Public Const EXTRACT_ISOLATE_LEFT = -1
  1114. Public Const EXTRACT_ISOLATE_RIGHT = 0
  1115.  
  1116. Declare Function cAddDigit Lib "t2win-32.dll" (Text As String) As Integer
  1117. Declare Function cAlign Lib "t2win-32.dll" (Text As String, ByVal TypeAlign As Integer, ByVal NewLength As Long) As String
  1118. Declare Function cAndToken Lib "t2win-32.dll" (ByVal Text As String, ByVal Token As String) As Integer
  1119. Declare Function cAndTokenIn Lib "t2win-32.dll" (ByVal Text As String, ByVal Token As String, ByVal Separator As String) As Integer
  1120. Declare Function cArabicToRoman Lib "t2win-32.dll" (Var As Variant) As String
  1121. Declare Function cBlockCharFromLeft Lib "t2win-32.dll" (Text As String, ByVal Position As Long) As String
  1122. Declare Function cBlockCharFromRight Lib "t2win-32.dll" (Text As String, ByVal Position As Long) As String
  1123. Declare Sub cChangeChars Lib "t2win-32.dll" (Text As String, CharSet As String, NewCharSet As String)
  1124. Declare Sub cChangeCharsUntil Lib "t2win-32.dll" (Text As String, CharSet As String, NewCharSet As String, nUntil As String)
  1125. Declare Function cCheckChars Lib "t2win-32.dll" (Text As String, CharSet As String) As Integer
  1126. Declare Function cCheckNumericity Lib "t2win-32.dll" (Text As String) As Integer
  1127. Declare Sub cCnvASCIItoEBCDIC Lib "t2win-32.dll" (Text As String)
  1128. Declare Sub cCnvEBCDICtoASCII Lib "t2win-32.dll" (Text As String)
  1129. Declare Function cCompact Lib "t2win-32.dll" (Text As String) As String
  1130. Declare Function cCompress Lib "t2win-32.dll" (Text As String) As String
  1131. Declare Function cCompressTab Lib "t2win-32.dll" (Text As String, ByVal nTab As Long) As String
  1132. Declare Function cCount Lib "t2win-32.dll" (Text As String, Separator As String) As Integer
  1133. Declare Function cCplAlpha Lib "t2win-32.dll" (Text As String) As String
  1134. Declare Function cCplDigit Lib "t2win-32.dll" (Text As String) As String
  1135. Declare Function cCreateAndFill Lib "t2win-32.dll" (ByVal Length As Long, Text As String) As String
  1136. Declare Function cDeleteSubString Lib "t2win-32.dll" (ByVal Text As String, ByVal SubString As String, ByVal Sensitivity As Integer) As String
  1137. Declare Function cExpandTab Lib "t2win-32.dll" (Text As String, ByVal nTab As Long) As String
  1138. Declare Function cExtract Lib "t2win-32.dll" (ByVal Text As String, ByVal Key As String, ByVal FieldSep As String, ByVal Sensitivity As Integer) As String
  1139. Declare Function cExtractIsolate Lib "t2win-32.dll" (ByVal Text As String, ByVal Key As String, ByVal FieldSep As String, ByVal LeftOrRight As Integer, ByVal Sensitivity As Integer) As String
  1140. Declare Sub cFill Lib "t2win-32.dll" (Text As String, Fill As String)
  1141. Declare Function cFilterBlocks Lib "t2win-32.dll" (Text As String, Delimitor As String) As String
  1142. Declare Function cFilterChars Lib "t2win-32.dll" (Text As String, CharSet As String) As String
  1143. Declare Function cFilterFirstChars Lib "t2win-32.dll" (Text As String, CharSet As String) As String
  1144. Declare Function cFilterNotChars Lib "t2win-32.dll" (Text As String, CharSet As String) As String
  1145. Declare Function cFromHexa Lib "t2win-32.dll" (Text As String) As String
  1146. Declare Function cFromZ9 Lib "t2win-32.dll" (Text As String) As String
  1147. Declare Function cGet Lib "t2win-32.dll" (Text As String, ByVal Position As Long) As String
  1148. Declare Function cGetBlock Lib "t2win-32.dll" (Text As String, ByVal Position As Long, ByVal Length As Long) As String
  1149. Declare Function cGetIn Lib "t2win-32.dll" (Text As String, Separator As String, ByVal Position As Long) As String
  1150. Declare Function cGetInPart Lib "t2win-32.dll" (Text As String, Separator As String, ByVal Position As Long) As String
  1151. Declare Function cGetInPartR Lib "t2win-32.dll" (Text As String, Separator As String, ByVal Position As Long) As String
  1152. Declare Function cGetInR Lib "t2win-32.dll" (Text As String, Separator As String, ByVal Position As Long) As String
  1153. Declare Function cH2I Lib "t2win-32.dll" (ByVal Text As String) As Integer
  1154. Declare Function cH2L Lib "t2win-32.dll" (ByVal Text As String) As Long
  1155. Declare Function cInsertBlocks Lib "t2win-32.dll" (Text As String, Insert As String) As String
  1156. Declare Function cInsertBlocksBy Lib "t2win-32.dll" (Text As String, Insert As String, Delimitor As String) As String
  1157. Declare Function cInsertBlocksExt Lib "t2win-32.dll" (Text As String, Insert As String) As String
  1158. Declare Function cInsertByMask Lib "t2win-32.dll" (Text As String, Mask As String, Insert As String) As String
  1159. Declare Function cInsertChars Lib "t2win-32.dll" (Text As String, ByVal Position As Long, Insert As String) As String
  1160. Declare Function cInStr Lib "t2win-32.dll" (ByVal StartPosition As Long, ByVal Text As String, ByVal Search As String, ByVal Sensitivity As Integer) As Long
  1161. Declare Function cLFill Lib "t2win-32.dll" (ByVal Text As String, ByVal CharToFill As String, ByVal Length As Long) As String
  1162. Declare Function cLrc Lib "t2win-32.dll" (Text As String) As String
  1163. Declare Function cLSetIn Lib "t2win-32.dll" (ByVal Text As String, ByVal Separator As String, ByVal Position As Long, ByVal StringToInsert As String) As String
  1164. Declare Function cMatchTable Lib "t2win-32.dll" (ByVal Text As String, ByVal Match As String, ByVal Separator As String, ByVal Sensitivity As Integer) As Integer
  1165. Declare Function cMixChars Lib "t2win-32.dll" (Text As String) As String
  1166. Declare Function cMorse Lib "t2win-32.dll" (ByVal morse As String) As String
  1167. Declare Function cNumDigit Lib "t2win-32.dll" (Text As String) As Integer
  1168. Declare Function cOneCharFromLeft Lib "t2win-32.dll" (Text As String, ByVal Position As Long) As String
  1169. Declare Function cOneCharFromRight Lib "t2win-32.dll" (Text As String, ByVal Position As Long) As String
  1170. Declare Function cOrToken Lib "t2win-32.dll" (ByVal Text As String, ByVal Token As String) As Integer
  1171. Declare Function cOrTokenIn Lib "t2win-32.dll" (ByVal Text As String, ByVal Token As String, ByVal Separator As String) As Integer
  1172. Declare Function cPatternMatch Lib "t2win-32.dll" (ByVal Text As String, ByVal Pattern As String) As Integer
  1173. Declare Function cPatternMatchS Lib "t2win-32.dll" (ByVal Text As String, ByVal Pattern As String, ByVal Sensitivity As Integer) As Integer
  1174. Declare Function cPatternExtMatch Lib "t2win-32.dll" (ByVal Text As String, ByVal Pattern As String) As Integer
  1175. Declare Function cPatternExtMatchS Lib "t2win-32.dll" (ByVal Text As String, ByVal Pattern As String, ByVal Sensitivity As Integer) As Integer
  1176. Declare Function cProperName Lib "t2win-32.dll" (Text As String) As String
  1177. Declare Function cProperName2 Lib "t2win-32.dll" (Text As String, ByVal TokenToUse As String, ByVal Options As Integer) As String
  1178. Declare Function cRemoveBlockChar Lib "t2win-32.dll" (Text As String, ByVal Position As Long, ByVal Length As Long) As String
  1179. Declare Function cRemoveLastChar Lib "t2win-32.dll" (Text As String) As String
  1180. Declare Function cRemoveOneChar Lib "t2win-32.dll" (Text As String, ByVal Position As Long) As String
  1181. Declare Sub cReplaceChar Lib "t2win-32.dll" (sText As String, ByVal lPosition As Long, sChar As String)
  1182. Declare Sub cReplaceLastChar Lib "t2win-32.dll" (sText As String, sChar As String)
  1183. Declare Function cResizeString Lib "t2win-32.dll" (Text As String, ByVal NewLength As Long) As String
  1184. Declare Function cResizeStringAndFill Lib "t2win-32.dll" (Text As String, ByVal NewLength As Long, Fill As String) As String
  1185. Declare Function cReverse Lib "t2win-32.dll" (Text As String) As String
  1186. Declare Function cReverseSortStr Lib "t2win-32.dll" (Text As String, ByVal nItem As Integer, ByVal ItemLength As Integer) As Integer
  1187. Declare Function cRFill Lib "t2win-32.dll" (ByVal Text As String, ByVal CharToFill As String, ByVal Length As Long) As String
  1188. Declare Function cRomanToArabic Lib "t2win-32.dll" (Text As String) As Variant
  1189. Declare Function cRSetIn Lib "t2win-32.dll" (ByVal Text As String, ByVal Separator As String, ByVal Position As Long, ByVal StringToInsert As String) As String
  1190. Declare Function cScrollL Lib "t2win-32.dll" (Text As String) As String
  1191. Declare Function cScrollR Lib "t2win-32.dll" (Text As String) As String
  1192. Declare Sub cSetDefaultSeparator Lib "t2win-32.dll" (Separator As String)
  1193. Declare Function cSortStr Lib "t2win-32.dll" (Text As String, ByVal nItem As Integer, ByVal ItemLength As Integer) As Integer
  1194. Declare Function cStringReplace Lib "t2win-32.dll" (ByVal Text As String, ByVal Pattern As String, ByVal Sensitivity As Integer) As String
  1195. Declare Function cStringSAR Lib "t2win-32.dll" (ByVal Text As String, ByVal Search As String, ByVal Replace As String, ByVal Sensitivity As Integer) As String
  1196. Declare Function cToHexa Lib "t2win-32.dll" (Text As String) As String
  1197. Declare Function cTokenIn Lib "t2win-32.dll" (Text As String, Separator As String, ByVal Position As Integer) As String
  1198. Declare Function cToZ9 Lib "t2win-32.dll" (Text As String) As String
  1199. Declare Function cUncompact Lib "t2win-32.dll" (Text As String) As String
  1200. Declare Function cWrapLine Lib "t2win-32.dll" (ByVal Text As String, ByVal Length As Long, ByVal Separator As String, ByVal EndOfLine As String) As String
  1201.  
  1202. ' random
  1203.  
  1204. Declare Sub cRndInit Lib "t2win-32.dll" (ByVal nRnd As Long)
  1205. Declare Function cRnd Lib "t2win-32.dll" () As Double
  1206. Declare Function cRndD Lib "t2win-32.dll" () As Double
  1207. Declare Function cRndI Lib "t2win-32.dll" () As Integer
  1208. Declare Function cRndL Lib "t2win-32.dll" () As Long
  1209. Declare Function cRndS Lib "t2win-32.dll" () As Single
  1210.  
  1211. ' swap
  1212.  
  1213. Declare Sub cSwapB Lib "t2win-32.dll" (swap1 As Byte, swap2 As Byte)
  1214. Declare Sub cSwapD Lib "t2win-32.dll" (swap1 As Double, swap2 As Double)
  1215. Declare Sub cSwapI Lib "t2win-32.dll" (swap1 As Integer, swap2 As Integer)
  1216. Declare Sub cSwapL Lib "t2win-32.dll" (swap1 As Long, swap2 As Long)
  1217. Declare Sub cSwapS Lib "t2win-32.dll" (swap1 As Single, swap2 As Single)
  1218. Declare Sub cSwapStr Lib "t2win-32.dll" (swap1 As String, swap2 As String)
  1219.  
  1220. ' type
  1221.  
  1222. Declare Function cCompareTypeString Lib "t2win-32.dll" Alias "cTypesCompare" (TypeSrc As Any, ByVal Dst As String, ByVal lenTypeSrc As Integer) As Integer
  1223. Declare Function cCompareStringType Lib "t2win-32.dll" Alias "cTypesCompare" (ByVal Src As String, TypeDst As Any, ByVal lenTypeSrc As Integer) As Integer
  1224. Declare Sub cStringToType Lib "t2win-32.dll" Alias "cTypesCopy" (ByVal Src As String, TypeDst As Any, ByVal lenTypeSrc As Integer)
  1225. Declare Sub cTypeClear Lib "t2win-32.dll" (TypeSrc As Any, ByVal lenTypeSrc As Integer)
  1226. Declare Function cTypeMid Lib "t2win-32.dll" (TypeSrc As Any, ByVal Offset As Integer, ByVal Length As Integer) As String
  1227. Declare Function cTypesCompare Lib "t2win-32.dll" (Type1 As Any, Type2 As Any, ByVal lenType1 As Integer) As Integer
  1228. Declare Sub cTypesCopy Lib "t2win-32.dll" (TypeSrc As Any, TypeDst As Any, ByVal lenTypeSrc As Integer)
  1229. Declare Function cTypeTransfert Lib "t2win-32.dll" (TypeSrc As Any, ByVal lenTypeSrc As Integer) As String
  1230. Declare Sub cTypeToString Lib "t2win-32.dll" Alias "cTypesCopy" (TypeSrc As Any, ByVal Dst As String, ByVal lenTypeSrc As Integer)
  1231.  
  1232. ' miscelleanous
  1233.  
  1234. '  definition for error code for CONVERT
  1235. Public Const CNV_NO_ERROR = -1
  1236. Public Const CNV_ERROR_NO_CONVERSION_AVAILABLE = 0
  1237. Public Const CNV_ERROR_CONVERSION_TO_STRING = 1
  1238. Public Const CNV_ERROR_TIME_OUTSIDE_LIMIT = 2
  1239. Public Const CNV_ERROR_MISSING_TIME_SEPARATOR = 3
  1240. Public Const CNV_ERROR_BAD_HOUR = 4
  1241. Public Const CNV_ERROR_BAD_MINUTE = 5
  1242. Public Const CNV_ERROR_MISSING_DATE_SEPARATOR = 6
  1243. Public Const CNV_ERROR_BAD_DATE = 7
  1244.  
  1245. '  definition for conversion parameter for CONVERT
  1246. Public Const CNV_TIME_FILL_ZERO = 100
  1247. Public Const CNV_TIME = 101
  1248.  
  1249. Public Const CNV_HUNDRED_TIME_FILL_ZERO = 105
  1250. Public Const CNV_HUNDRED_TIME = 106
  1251.  
  1252. Public Const CNV_HOUR_FILL_ZERO_AND_WITH_ALWAYS_SIGN = 110
  1253. Public Const CNV_HOUR_FILL_ZERO_AND_WITH_SIGN = 111
  1254. Public Const CNV_HOUR_WITH_ALWAYS_SIGN = 112
  1255. Public Const CNV_HOUR_AND_WITH_SIGN = 113
  1256.  
  1257. Public Const CNV_HUNDRED_HOUR_FILL_ZERO_AND_WITH_ALWAYS_SIGN = 115
  1258. Public Const CNV_HUNDRED_HOUR_FILL_ZERO_AND_WITH_SIGN = 116
  1259. Public Const CNV_HUNDRED_HOUR_WITH_ALWAYS_SIGN = 117
  1260. Public Const CNV_HUNDRED_HOUR_AND_WITH_SIGN = 118
  1261.  
  1262. Public Const CNV_BALANCE_FILL_ZERO_AND_WITH_ALWAYS_SIGN = 120
  1263. Public Const CNV_BALANCE_FILL_ZERO_AND_WITH_SIGN = 121
  1264. Public Const CNV_BALANCE_WITH_ALWAYS_SIGN = 122
  1265. Public Const CNV_BALANCE_AND_WITH_SIGN = 123
  1266.  
  1267. Public Const CNV_HUNDRED_BALANCE_FILL_ZERO_AND_WITH_ALWAYS_SIGN = 125
  1268. Public Const CNV_HUNDRED_BALANCE_FILL_ZERO_AND_WITH_SIGN = 126
  1269. Public Const CNV_HUNDRED_BALANCE_WITH_ALWAYS_SIGN = 127
  1270. Public Const CNV_HUNDRED_BALANCE_AND_WITH_SIGN = 128
  1271.  
  1272. Public Const CNV_DATE_SHORT = 200
  1273. Public Const CNV_DATE_LONG = 201
  1274.  
  1275. Public Const CNV_DATE_HOUR_WITH_EXTRA = 205
  1276. Public Const CNV_DATE_HOUR_WITH_EXTRA_IN_SECONDS = 206
  1277. Public Const CNV_DATE_HOUR_WITHOUT_EXTRA = 207
  1278.  
  1279. Declare Function cMax Lib "t2win-32.dll" (Var1 As Variant, Var2 As Variant) As Variant
  1280. Declare Function cMin Lib "t2win-32.dll" (Var1 As Variant, Var2 As Variant) As Variant
  1281. Declare Sub cIncrI Lib "t2win-32.dll" (Value As Integer)
  1282. Declare Sub cIncrL Lib "t2win-32.dll" (Value As Long)
  1283. Declare Sub cDecrI Lib "t2win-32.dll" (Value As Integer)
  1284. Declare Sub cDecrL Lib "t2win-32.dll" (Value As Long)
  1285. Declare Function cSpellMoney Lib "t2win-32.dll" (ByVal Value As Double, ByVal Units As String, ByVal Cents As String) As String
  1286. Declare Function cFraction Lib "t2win-32.dll" (ByVal nValue As Double, nNumerator As Double, nDenominator As Double) As Double
  1287. Declare Function cCombination Lib "t2win-32.dll" (ByVal nItems As Integer, ByVal mTimes As Integer) As Double
  1288. Declare Function cSgn Lib "t2win-32.dll" (ByVal Value As Integer) As Integer
  1289. Declare Function cBetween Lib "t2win-32.dll" (Var As Variant, Var1 As Variant, Var2 As Variant) As Integer
  1290. Declare Function cGetPid Lib "t2win-32.dll" () As Integer
  1291. Declare Function cBaseConversion Lib "t2win-32.dll" (ByVal Num As String, ByVal RadixIn As Integer, ByVal RadixOut As Integer) As String
  1292. Declare Function cConvert Lib "t2win-32.dll" (ByVal WhichConversion As Integer, WhichValue As Variant, ConvertError As Integer) As String
  1293.  
  1294. ' windows
  1295.  
  1296. '  definition for win.ini section
  1297. Public Const GET_TIME_SEPARATOR = 1
  1298. Public Const GET_DATE_SEPARATOR = 2
  1299. Public Const GET_TIME_FORMAT = 3
  1300. Public Const GET_DATE_FORMAT = 4
  1301. Public Const GET_CURRENCY = 5
  1302. Public Const GET_LANGUAGE = 6
  1303. Public Const GET_COUNTRY = 7
  1304. Public Const GET_COUNTRY_CODE = 8
  1305. Public Const GET_LIST_SEPARATOR = 9
  1306. Public Const GET_DEFAULT_PRINTER = 10
  1307. Public Const GET_DECIMAL_SEPARATOR = 11
  1308. Public Const GET_THOUSAND_SEPARATOR = 12
  1309.  
  1310. Declare Sub cArrangeDesktopIcons Lib "t2win-32.dll" ()
  1311. Declare Sub cCenterWindow Lib "t2win-32.dll" (ByVal hWnd As Long)
  1312. Declare Function cEXEnameActiveWindow Lib "t2win-32.dll" () As String
  1313. Declare Function cEXEnameWindow Lib "t2win-32.dll" (ByVal hWnd As Long) As String
  1314. Declare Function cEXEnameTask Lib "t2win-32.dll" (ByVal nFileName As String) As String
  1315. Declare Function cExitWindowsAndExecute Lib "t2win-32.dll" (ByVal lpszExe As String, ByVal lpszParams As String) As Integer
  1316. Declare Function cFindFileInEnv Lib "t2win-32.dll" (ByVal lpFilename As String, ByVal lpEnv As String) As Integer
  1317. Declare Function cFindFileInPath Lib "t2win-32.dll" (ByVal lpFilename As String) As Integer
  1318. Declare Function cGetClassName Lib "t2win-32.dll" (ByVal hWnd As Long) As String
  1319. Declare Function cGetCountry Lib "t2win-32.dll" () As String
  1320. Declare Function cGetCountryCode Lib "t2win-32.dll" () As String
  1321. Declare Function cGetCurrency Lib "t2win-32.dll" () As String
  1322. Declare Function cGetCurrentDrive Lib "t2win-32.dll" () As String
  1323. Declare Function cGetDateFormat Lib "t2win-32.dll" () As String
  1324. Declare Function cGetDateSeparator Lib "t2win-32.dll" () As String
  1325. Declare Function cGetDefaultCurrentDir Lib "t2win-32.dll" () As String
  1326. Declare Function cGetDefaultPrinter Lib "t2win-32.dll" () As String
  1327. Declare Function cGetDevices Lib "t2win-32.dll" () As String
  1328. Declare Function cGetDriveCurrentDir Lib "t2win-32.dll" (ByVal lpDrive As String) As String
  1329. Declare Function cGetFullNameInEnv Lib "t2win-32.dll" (ByVal lpFilename As String, ByVal lpEnv As String) As String
  1330. Declare Function cGetFullNameInPath Lib "t2win-32.dll" (ByVal lpFilename As String) As String
  1331. Declare Function cGetHourFormat Lib "t2win-32.dll" () As String
  1332. Declare Function cGetIni Lib "t2win-32.dll" (ByVal AppName As String, ByVal szItem As String, ByVal szDefault As String, ByVal InitFile As String) As String
  1333. Declare Function cGetLanguage Lib "t2win-32.dll" () As String
  1334. Declare Function cGetListSeparator Lib "t2win-32.dll" () As String
  1335. Declare Function cGetSystemDirectory Lib "t2win-32.dll" () As String
  1336. Declare Function cGetTimeSeparator Lib "t2win-32.dll" () As String
  1337. Declare Function cGetWindowsDirectory Lib "t2win-32.dll" () As String
  1338. Declare Function cGetWinINI Lib "t2win-32.dll" (ByVal Info As Integer) As String
  1339. Declare Function cGetWinSection Lib "t2win-32.dll" (ByVal Section As String) As String
  1340. Declare Sub cPutIni Lib "t2win-32.dll" (ByVal AppName As String, ByVal szItem As String, ByVal szDefault As String, ByVal InitFile As String)
  1341. Declare Function cRebootSystem Lib "t2win-32.dll" () As Integer
  1342. Declare Function cRestartWindows Lib "t2win-32.dll" () As Integer
  1343. Declare Function cSetHandleCount Lib "t2win-32.dll" (ByVal nHandle As Integer) As Integer
  1344. Declare Sub cShowWindow Lib "t2win-32.dll" (ByVal hWnd As Long, ByVal Method As Integer, ByVal interval As Integer)
  1345. Declare Function cGetSectionItems Lib "t2win-32.dll" (ByVal Section As String, ByVal InitFile As String, nItems As Integer) As String
  1346. Declare Function cTaskBarAddIcon Lib "t2win-32.dll" (ByVal hWnd As Long, ByVal hIcon As Long, ByVal lpszTip As String) As Integer
  1347. Declare Function cTaskBarDeleteIcon Lib "t2win-32.dll" (ByVal hWnd As Long) As Integer
  1348. Declare Function cTaskBarModifyIcon Lib "t2win-32.dll" (ByVal hWnd As Long, ByVal hIcon As Long, ByVal lpszTip As String) As Integer
  1349.  
  1350. ' list/combo box
  1351.  
  1352. Public Const DDL_READWRITE = &H0
  1353. Public Const DDL_READONLY = &H1
  1354. Public Const DDL_HIDDEN = &H2
  1355. Public Const DDL_SYSTEM = &H4
  1356. Public Const DDL_DIRECTORY = &H10
  1357. Public Const DDL_ARCHIVE = &H20
  1358. Public Const DDL_POSTMSGS = &H2000
  1359. Public Const DDL_DRIVES = &H4000
  1360. Public Const DDL_EXCLUSIVE = &H8000
  1361.  
  1362. Declare Function cArrayToComboBox Lib "t2win-32.dll" (ByVal hWnd As Long, Strarray() As String) As Integer
  1363. Declare Function cArrayToListBox Lib "t2win-32.dll" (ByVal hWnd As Long, Strarray() As String) As Integer
  1364. Declare Function cComboBoxToFile Lib "t2win-32.dll" (ByVal hWnd As Long, ByVal nFile As String) As Integer
  1365. Declare Function cComboFiles Lib "t2win-32.dll" (ByVal hWnd As Long, ByVal Attributes As Long, ByVal FilePathMask As String) As Integer
  1366. Declare Function cComboSearchDir Lib "t2win-32.dll" (ByVal hWnd As Long, ByVal StartPath As String, ByVal FileMask As String) As Long
  1367. Declare Function cComboSearchFile Lib "t2win-32.dll" (ByVal hWnd As Long, ByVal StartPath As String, ByVal FileMask As String) As Long
  1368. Declare Function cComboSearchFileAttrib Lib "t2win-32.dll" (ByVal hWnd As Long, ByVal StartPath As String, ByVal FileMask As String, ByVal iSearchAttribute As Integer) As Long
  1369. Declare Function cFileToComboBox Lib "t2win-32.dll" (ByVal hWnd As Long, ByVal nFile As String) As Integer
  1370. Declare Function cFileToListBox Lib "t2win-32.dll" (ByVal hWnd As Long, ByVal nFile As String) As Integer
  1371. Declare Function cListBoxToFile Lib "t2win-32.dll" (ByVal hWnd As Long, ByVal nFile As String) As Integer
  1372. Declare Function cListFiles Lib "t2win-32.dll" (ByVal hWnd As Long, ByVal Attributes As Long, ByVal FilePathMask As String) As Integer
  1373. Declare Function cListSearchDir Lib "t2win-32.dll" (ByVal hWnd As Long, ByVal StartPath As String, ByVal FileMask As String) As Long
  1374. Declare Function cListSearchFile Lib "t2win-32.dll" (ByVal hWnd As Long, ByVal StartPath As String, ByVal FileMask As String) As Long
  1375. Declare Function cListSearchFileAttrib Lib "t2win-32.dll" (ByVal hWnd As Long, ByVal StartPath As String, ByVal FileMask As String, ByVal iSearchAttribute As Integer) As Long
  1376. Declare Function cListSetTabs Lib "t2win-32.dll" (ByVal hWnd As Long, TabArray() As Long) As Integer
  1377.  
  1378. ' mdtkfv
  1379.  
  1380. '  definition for sFile version information
  1381. Public Const VER_VERSION_PRODUCT = -1
  1382. Public Const VER_VERSION_FILE = 0
  1383. Public Const VER_COMPANY_NAME = 1
  1384. Public Const VER_FILE_DESCRIPTION = 2
  1385. Public Const VER_FILE_VERSION = 3
  1386. Public Const VER_INTERNAL_NAME = 4
  1387. Public Const VER_LEGAL_COPYRIGHT = 5
  1388. Public Const VER_LEGAL_TRADEMARKS = 6
  1389. Public Const VER_PRODUCT_NAME = 7
  1390. Public Const VER_PRODUCT_VERSION = 8
  1391.  
  1392. '  structure for sFile version information
  1393. Type tagFILEVERSIONINFO
  1394.    VersionProduct    As String
  1395.    VersionFile       As String
  1396.    CompanyName       As String
  1397.    FileDescription   As String
  1398.    FileVersion       As String
  1399.    InternalName      As String
  1400.    LegalCopyright    As String
  1401.    LegalTrademarks   As String
  1402.    Comments          As String
  1403.    ProductName       As String
  1404.    ProductVersion    As String
  1405. End Type
  1406.  
  1407. ' structure for modules
  1408. Type tagMODULEENTRY
  1409.    dwSize               As Long
  1410.    th32ModuleID         As Long
  1411.    th32ProcessID        As Long
  1412.    GlblcntUsage         As Long
  1413.    ProccntUsage         As Long
  1414.    modBaseAddr          As Byte
  1415.    modBaseSize          As Long
  1416.    hModule              As Long
  1417.    szModule             As String * 256
  1418.    szExePath            As String * 260
  1419. End Type
  1420.  
  1421. Type tagPROCESSENTRY
  1422.    dwSize               As Long
  1423.    cntUsage             As Long
  1424.    th32ProcessID        As Long
  1425.    th32DefaultHeapID    As Long
  1426.    th32ModuleID         As Long
  1427.    cntThreads           As Long
  1428.    th32ParentProcessID  As Long
  1429.    pcPriClassBase       As Long
  1430.    dwFlags              As Long
  1431.    szExeFile            As String * 260
  1432. End Type
  1433.  
  1434. Type tagTHREADENTRY
  1435.    dwSize               As Long
  1436.    cntUsage             As Long
  1437.    th32ThreadID         As Long
  1438.    th32OwnerProcessID   As Long
  1439.    tpBasePri            As Long
  1440.    tpDeltaPri           As Long
  1441.    dwFlags              As Long
  1442. End Type
  1443.  
  1444. Declare Sub cChangeTaskName Lib "t2win-32.dll" (ByVal hWnd As Long, ByVal Text As String)
  1445. Declare Function cGetFileVersion Lib "t2win-32.dll" (ByVal FileName As String, ByVal nFonction As Integer) As String
  1446. Declare Function cGetFileVersionInfo Lib "t2win-32.dll" (ByVal FileName As String, FILEVERSIONINFO As Any) As Integer
  1447. Declare Function cGetChangeTaskName Lib "t2win-32.dll" (ByVal hWnd As Long, ByVal Text As String) As String
  1448. Declare Function cGetTaskName Lib "t2win-32.dll" (ByVal hWnd As Long) As String
  1449. Declare Function cModule Lib "t2w32mpt.dll" (MODULEENTRY As tagMODULEENTRY, ByVal FirstNext As Integer) As Integer
  1450. Declare Function cProcess Lib "t2w32mpt.dll" (PROCESSENTRY As tagPROCESSENTRY, ByVal FirstNext As Integer) As Integer
  1451. Declare Function cThread Lib "t2w32mpt.dll" (THREADENTRY As tagTHREADENTRY, ByVal FirstNext As Integer) As Integer
  1452. Declare Function cWalkThruWindow Lib "t2win-32.dll" (Class As String, Caption As String, OwnerHwnd As Long, OwnerClass As String, OwnerCaption As String, ByVal FirstNext As Integer) As Long
  1453.  
  1454. ' date - time
  1455.  
  1456. Declare Function cAddTime Lib "t2win-32.dll" (ByVal Hr As Integer) As Integer
  1457. Declare Function cAddTwoTimes Lib "t2win-32.dll" (ByVal Time1 As String, ByVal Time2 As String) As String
  1458. Declare Function cCheckTime Lib "t2win-32.dll" (ByVal Hr As Integer, ByVal Hr1 As Integer, ByVal Hr2 As Integer) As Integer
  1459. Declare Function cCurrentTime Lib "t2win-32.dll" () As Integer
  1460. Declare Function cDateHourToLong Lib "t2win-32.dll" (ByVal nYear As Integer, ByVal nMonth As Integer, ByVal nDay As Integer, ByVal nHour As Integer, ByVal nMinute As Integer, ByVal nExtra As Integer) As Long
  1461. Declare Function cDateToInt Lib "t2win-32.dll" (ByVal nYear As Integer, ByVal nMonth As Integer, ByVal nDay As Integer) As Integer
  1462. Declare Function cDateToScalar Lib "t2win-32.dll" (ByVal nYear As Integer, ByVal nMonth As Integer, ByVal nDay As Integer) As Long
  1463. Declare Function cDayOfWeek Lib "t2win-32.dll" (ByVal nYear As Integer, ByVal nMonth As Integer, ByVal nDay As Integer, ByVal nISO As Integer) As Integer
  1464. Declare Function cDayOfYear Lib "t2win-32.dll" (ByVal nYear As Integer, ByVal nMonth As Integer, ByVal nDay As Integer) As Integer
  1465. Declare Function cDaysInMonth Lib "t2win-32.dll" (ByVal nYear As Integer, ByVal nMonth As Integer) As Integer
  1466. Declare Function cExtCurrentTime Lib "t2win-32.dll" () As Long
  1467. Declare Function cHourTo Lib "t2win-32.dll" (Text As String) As Variant
  1468. Declare Function cIntoBalance Lib "t2win-32.dll" (Var As Variant) As String
  1469. Declare Function cIntoBalanceFill Lib "t2win-32.dll" (Var As Variant) As String
  1470. Declare Function cIntoDate Lib "t2win-32.dll" (ByVal nDate As Long) As String
  1471. Declare Function cIntoDateFill Lib "t2win-32.dll" (ByVal nDate As Long) As String
  1472. Declare Function cIntoDateNull Lib "t2win-32.dll" (ByVal nDate As Long) As String
  1473. Declare Function cIntoFixHour Lib "t2win-32.dll" (Var As Variant, ByVal Length As Integer, ByVal fillZero As Integer, ByVal CentiΦme As Integer) As String
  1474. Declare Function cIntoHour Lib "t2win-32.dll" (Var As Variant) As String
  1475. Declare Function cIntoVarHour Lib "t2win-32.dll" (Var As Variant) As String
  1476. Declare Sub cIntToDate Lib "t2win-32.dll" (ByVal Scalar As Integer, nYear As Integer, nMonth As Integer, nDay As Integer)
  1477. Declare Sub cLongToDateHour Lib "t2win-32.dll" (ByVal Scalar As Long, nYear As Integer, nMonth As Integer, nDay As Integer, nHour As Integer, nMinute As Integer, nExtra As Integer)
  1478. Declare Sub cScalarToDate Lib "t2win-32.dll" (ByVal Scalar As Long, nYear As Integer, nMonth As Integer, nDay As Integer)
  1479. Declare Sub cScalarToTime Lib "t2win-32.dll" (ByVal Scalar As Long, nHour As Integer, nMin As Integer, nSec As Integer)
  1480. Declare Function cTimeBetween Lib "t2win-32.dll" (ByVal Hr1 As Integer, ByVal Hr2 As Integer) As Integer
  1481. Declare Function cTimeToScalar Lib "t2win-32.dll" (ByVal nHour As Integer, ByVal nMin As Integer, ByVal nSec As Integer) As Long
  1482. Declare Function cTrueBetween Lib "t2win-32.dll" (Var As Variant, Var1 As Variant, Var2 As Variant) As Integer
  1483. Declare Function cWeekOfYear Lib "t2win-32.dll" (ByVal nYear As Integer, ByVal nMonth As Integer, ByVal nDay As Integer, ByVal nISO As Integer) As Integer
  1484.  
  1485. ' process id
  1486.  
  1487. Declare Sub cPushID Lib "t2win-32.dll" (IDArray() As Integer, ByVal nID As Integer)
  1488. Declare Sub cPopID Lib "t2win-32.dll" (IDArray() As Integer, ByVal nID As Integer)
  1489. Declare Sub cPopLastID Lib "t2win-32.dll" (IDArray() As Integer)
  1490. Declare Function cGetID Lib "t2win-32.dll" (IDArray() As Integer, ByVal nPosition As Integer) As Integer
  1491. Declare Sub cClearID Lib "t2win-32.dll" (IDArray() As Integer)
  1492.  
  1493. ' sFile I/O, direct routines issued from C functionnalities
  1494.  
  1495. Declare Function cFopen Lib "t2win-32.dll" (ByVal sFile As String, ByVal Mode As String) As Long
  1496. Declare Function cFclose Lib "t2win-32.dll" (ByVal IOstream As Long) As Integer
  1497. Declare Function cFgetc Lib "t2win-32.dll" (ByVal IOstream As Long) As Integer
  1498. Declare Function cFputc Lib "t2win-32.dll" (ByVal char As Integer, ByVal IOstream As Long) As Integer
  1499. Declare Function cFputs Lib "t2win-32.dll" (ByVal Text As String, ByVal IOstream As Long) As Integer
  1500. Declare Function cFgets Lib "t2win-32.dll" (Text As String, ByVal Length As Integer, ByVal IOstream As Long) As Integer
  1501. Declare Function cFwrite Lib "t2win-32.dll" (Text As String, ByVal IOstream As Long) As Integer
  1502. Declare Function cFread Lib "t2win-32.dll" (Text As String, ByVal Length As Integer, ByVal IOstream As Long) As Integer
  1503. Declare Function cFcloseall Lib "t2win-32.dll" () As Integer
  1504. Declare Function cFflush Lib "t2win-32.dll" (ByVal IOstream As Long) As Integer
  1505. Declare Function cFflushall Lib "t2win-32.dll" () As Integer
  1506. Declare Function cFeof Lib "t2win-32.dll" (ByVal IOstream As Long) As Integer
  1507. Declare Function cFerror Lib "t2win-32.dll" (ByVal IOstream As Long) As Integer
  1508. Declare Sub cFclearerr Lib "t2win-32.dll" (ByVal IOstream As Long)
  1509. Declare Function cFseek Lib "t2win-32.dll" (ByVal IOstream As Long, ByVal Offset As Long, ByVal origin As Integer) As Integer
  1510. Declare Function cFtell Lib "t2win-32.dll" (ByVal IOstream As Long) As Long
  1511. Declare Sub cFrewind Lib "t2win-32.dll" (ByVal IOstream As Long)
  1512. Declare Function cFProcessAsciiFile Lib "t2win-32.dll" (ByVal IOstream As Long, AsciiOffset() As Long) As Long
  1513. Declare Function cFGotoRecord Lib "t2win-32.dll" (ByVal IOstream As Long, AsciiOffset() As Long, ByVal Record As Long) As Integer
  1514. Declare Function cFStdIn Lib "t2win-32.dll" () As Long
  1515. Declare Function cFStdOut Lib "t2win-32.dll" () As Long
  1516. Declare Function cFStdErr Lib "t2win-32.dll" () As Long
  1517.  
  1518. ' day - month
  1519.  
  1520. '  definition for language in multi-language management
  1521. Public Const LNG_FRENCH = 1
  1522. Public Const LNG_DUTCH = 2
  1523. Public Const LNG_GERMAN = 3
  1524. Public Const LNG_ENGLISH = 4
  1525. Public Const LNG_ITALIAN = 5
  1526. Public Const LNG_SPANISH = 6
  1527. Public Const LNG_CATALAN = 7
  1528. Public Const LNG_POLISH = 8
  1529. Public Const LNG_NORWAY = 9
  1530. Public Const LNG_SWEDISH = 10
  1531.  
  1532. Declare Function cGetAscTime Lib "t2win-32.dll" (ByVal nLanguage As Integer) As String
  1533. Declare Function cGetLongDay Lib "t2win-32.dll" (ByVal nLanguage As Integer, ByVal nDay As Integer) As String
  1534. Declare Function cGetLongMonth Lib "t2win-32.dll" (ByVal nLanguage As Integer, ByVal nMonth As Integer) As String
  1535. Declare Function cGetShortDay Lib "t2win-32.dll" (ByVal nLanguage As Integer, ByVal nDay As Integer) As String
  1536. Declare Function cGetShortMonth Lib "t2win-32.dll" (ByVal nLanguage As Integer, ByVal nMonth As Integer) As String
  1537. Declare Function cGetSmallDay Lib "t2win-32.dll" (ByVal nLanguage As Integer, ByVal nDay As Integer) As String
  1538. Declare Function cGetTinyDay Lib "t2win-32.dll" (ByVal nLanguage As Integer, ByVal nDay As Integer) As String
  1539. Declare Function cGetTinyMonth Lib "t2win-32.dll" (ByVal nLanguage As Integer, ByVal nMonth As Integer) As String
  1540. Declare Sub cSysMenuChange Lib "t2win-32.dll" (ByVal hWnd As Long, ByVal Position As Integer, ByVal NewMessage As String)
  1541.  
  1542. ' Functions for calculating 2-D geometry
  1543.  
  1544. '  structure for 2-D geometry types
  1545. Type tagVECTOR2
  1546.    x              As Double
  1547.    y              As Double
  1548. End Type
  1549.  
  1550. Declare Sub cV2Add Lib "t2win-32.dll" (u As tagVECTOR2, v As tagVECTOR2, w As tagVECTOR2)
  1551. Declare Sub cV2Sub Lib "t2win-32.dll" (u As tagVECTOR2, v As tagVECTOR2, w As tagVECTOR2)
  1552. Declare Sub cV2Combine Lib "t2win-32.dll" (u As tagVECTOR2, ByVal c1 As Double, v As tagVECTOR2, ByVal c2 As Double, w As tagVECTOR2)
  1553. Declare Sub cV2Copy Lib "t2win-32.dll" (u As tagVECTOR2, w As tagVECTOR2)
  1554. Declare Function cV2Dot Lib "t2win-32.dll" (u As tagVECTOR2, v As tagVECTOR2) As Double
  1555. Declare Function cV2Length Lib "t2win-32.dll" (u As tagVECTOR2) As Double
  1556. Declare Function cV2LengthSquared Lib "t2win-32.dll" (u As tagVECTOR2) As Double
  1557. Declare Sub cV2LinearIp Lib "t2win-32.dll" (lo As tagVECTOR2, hi As tagVECTOR2, ByVal alpha As Double, w As tagVECTOR2)
  1558. Declare Sub cV2Mul Lib "t2win-32.dll" (u As tagVECTOR2, v As tagVECTOR2, w As tagVECTOR2)
  1559. Declare Sub cV2Neg Lib "t2win-32.dll" (u As tagVECTOR2)
  1560. Declare Sub cV2Normalized Lib "t2win-32.dll" (u As tagVECTOR2)
  1561. Declare Sub cV2Ortho Lib "t2win-32.dll" (u As tagVECTOR2, w As tagVECTOR2)
  1562. Declare Sub cV2ScaledNewLength Lib "t2win-32.dll" (u As tagVECTOR2, ByVal newlen As Double)
  1563. Declare Function cV2SegmentLength Lib "t2win-32.dll" (p As tagVECTOR2, q As tagVECTOR2) As Double
  1564.  
  1565. ' Functions for calculating 3-D geometry
  1566.  
  1567. '  structure for 3-D geometry types
  1568. Type tagVECTOR3
  1569.    x              As Double
  1570.    y              As Double
  1571.    z              As Double
  1572. End Type
  1573.  
  1574. Declare Sub cV3Add Lib "t2win-32.dll" (u As tagVECTOR3, v As tagVECTOR3, w As tagVECTOR3)
  1575. Declare Sub cV3Sub Lib "t2win-32.dll" (u As tagVECTOR3, v As tagVECTOR3, w As tagVECTOR3)
  1576. Declare Sub cV3Combine Lib "t2win-32.dll" (u As tagVECTOR3, ByVal c1 As Double, v As tagVECTOR3, ByVal c2 As Double, w As tagVECTOR3)
  1577. Declare Sub cV3Copy Lib "t2win-32.dll" (u As tagVECTOR3, w As tagVECTOR3)
  1578. Declare Sub cV3Cross Lib "t2win-32.dll" (u As tagVECTOR3, v As tagVECTOR3, w As tagVECTOR3)
  1579. Declare Function cV3Dot Lib "t2win-32.dll" (u As tagVECTOR3, v As tagVECTOR3) As Double
  1580. Declare Function cV3Length Lib "t2win-32.dll" (u As tagVECTOR3) As Double
  1581. Declare Function cV3LengthSquared Lib "t2win-32.dll" (u As tagVECTOR3) As Double
  1582. Declare Sub cV3LinearIp Lib "t2win-32.dll" (lo As tagVECTOR3, hi As tagVECTOR3, ByVal alpha As Double, w As tagVECTOR3)
  1583. Declare Sub cV3Mul Lib "t2win-32.dll" (u As tagVECTOR3, v As tagVECTOR3, w As tagVECTOR3)
  1584. Declare Sub cV3Neg Lib "t2win-32.dll" (u As tagVECTOR3)
  1585. Declare Sub cV3Normalized Lib "t2win-32.dll" (u As tagVECTOR3)
  1586. Declare Sub cV3ScaledNewLength Lib "t2win-32.dll" (u As tagVECTOR3, ByVal newlen As Double)
  1587. Declare Function cV3SegmentLength Lib "t2win-32.dll" (p As tagVECTOR3, q As tagVECTOR3) As Double
  1588.  
  1589. Declare Function c3DWeightAverage Lib "t2win-32.dll" (ul3D As tagVECTOR3, ll3D As tagVECTOR3, lr3D As tagVECTOR3, ur3D As tagVECTOR3, ptToLocate3D As tagVECTOR3) As Double
  1590.  
  1591. ' huge string
  1592.  
  1593. Declare Function cHugeStrAdd Lib "t2win-32.dll" (ByVal hsHandle As Long, hsText As String) As Integer
  1594. Declare Function cHugeStrAddress Lib "t2win-32.dll" (ByVal hsHandle As Long) As Long
  1595. Declare Function cHugeStrAppend Lib "t2win-32.dll" (ByVal hsHandle As Long, hsText As String) As Integer
  1596. Declare Function cHugeStrBlocks Lib "t2win-32.dll" (ByVal hsHandle As Long) As Long
  1597. Declare Function cHugeStrClear Lib "t2win-32.dll" (ByVal hsHandle As Long) As Integer
  1598. Declare Function cHugeStrCreate Lib "t2win-32.dll" (ByVal hsSize As Long) As Long
  1599. Declare Function cHugeStrFree Lib "t2win-32.dll" (ByVal hsHandle As Long) As Integer
  1600. Declare Function cHugeStrGetNP Lib "t2win-32.dll" (ByVal hsHandle As Long) As Long
  1601. Declare Function cHugeStrGetWP Lib "t2win-32.dll" (ByVal hsHandle As Long) As Long
  1602. Declare Function cHugeStrLength Lib "t2win-32.dll" (ByVal hsHandle As Long) As Long
  1603. Declare Function cHugeStrMid Lib "t2win-32.dll" (ByVal hsHandle As Long, ByVal hsStart As Long, ByVal hsLength As Long) As String
  1604. Declare Function cHugeStrNext Lib "t2win-32.dll" (ByVal hsHandle As Long, ByVal hsNext As Long) As String
  1605. Declare Function cHugeStrOnDisk Lib "t2win-32.dll" (ByVal hsHandle As Long, ByVal hsFile As String, ByVal hsGetPut As Integer) As Long
  1606. Declare Function cHugeStrRead Lib "t2win-32.dll" (ByVal hsHandle As Long, ByVal hsBlock As Long) As String
  1607. Declare Function cHugeStrSetNP Lib "t2win-32.dll" (ByVal hsHandle As Long, ByVal hsPtr As Long) As Integer
  1608. Declare Function cHugeStrSetWP Lib "t2win-32.dll" (ByVal hsHandle As Long, ByVal hsPtr As Long) As Integer
  1609. Declare Function cHugeStrSize Lib "t2win-32.dll" (ByVal hsHandle As Long) As Long
  1610.  
  1611. ' t2win-32 version
  1612.  
  1613. Declare Function cGetVersion Lib "t2win-32.dll" () As Single
  1614. Declare Function cIsRegistered Lib "t2win-32.dll" () As Integer
  1615.  
  1616. ' protect
  1617.  
  1618. Declare Function cDESencrypt Lib "t2win-32.dll" (Text As String, Key As String) As String
  1619. Declare Function cDESdecrypt Lib "t2win-32.dll" (Text As String, Key As String) As String
  1620. Declare Function cDIAMONDencrypt Lib "t2win-32.dll" (Text As String, Key As String, ByVal Mode As Integer) As String
  1621. Declare Function cDIAMONDdecrypt Lib "t2win-32.dll" (Text As String, Key As String, ByVal Mode As Integer) As String
  1622. Declare Function cHashMD5 Lib "t2win-32.dll" (Text As String) As String
  1623. Declare Function cIDEAencrypt Lib "t2win-32.dll" (Text As String, Key As String) As String
  1624. Declare Function cIDEAdecrypt Lib "t2win-32.dll" (Text As String, Key As String) As String
  1625. Declare Function cMod10 Lib "t2win-32.dll" (ByVal Text As String) As Integer
  1626. Declare Function cMod10R Lib "t2win-32.dll" (ByVal Text As String) As Integer
  1627. Declare Function cMod11 Lib "t2win-32.dll" (ByVal Text As String) As Integer
  1628. Declare Function cMod11R Lib "t2win-32.dll" (ByVal Text As String) As Integer
  1629. Declare Function cMod137 Lib "t2win-32.dll" (ByVal Text As String) As Integer
  1630. Declare Function cMod137R Lib "t2win-32.dll" (ByVal Text As String) As Integer
  1631. Declare Function cRegistrationKey Lib "t2win-32.dll" (ByVal RegText As String, ByVal RegKey1 As Long) As Long
  1632. Declare Function cRegistrationKey2 Lib "t2win-32.dll" (ByVal RegText As String, ByVal RegKey1 As Long, ByVal RegKey2 As Long) As Long
  1633. Declare Function cRegistrationKey3 Lib "t2win-32.dll" (ByVal RegText As String, ByVal RegKey1 As Long, ByVal RegKey2 As Long, ByVal RegKey3 As Long) As Long
  1634. Declare Function cRUBYencrypt Lib "t2win-32.dll" (Text As String, Key As String, ByVal Mode As Integer) As String
  1635. Declare Function cRUBYdecrypt Lib "t2win-32.dll" (Text As String, Key As String, ByVal Mode As Integer) As String
  1636.  
  1637. ' file protect
  1638.  
  1639. Public Const CRYPTO_KEY_TOO_SMALL = -1
  1640. Public Const CRYPTO_CANT_INIT_KEY = -2
  1641. Public Const CRYPTO_CANT_INIT_BUFFER = -11
  1642. Public Const CRYPTO_CANT_OPEN_FILEIN = -21
  1643. Public Const CRYPTO_CANT_CREATE_FILEOUT = -22
  1644. Public Const CRYPTO_ERROR_READING_FILEIN = -31
  1645. Public Const CRYPTO_ERROR1_WRITING_FILEOUT = -41
  1646. Public Const CRYPTO_ERROR2_WRITING_FILEOUT = -42
  1647. Public Const CRYPTO_ERROR1_WRITING_LASTBYTE = -51
  1648. Public Const CRYPTO_ERROR2_WRITING_LASTBYTE = -52
  1649. Public Const CRYPTO_BAD_LASTBYTE = -61
  1650.  
  1651. Public Const DIAMOND_FULL_MODE1 = 1          ' more strongest (slowest)
  1652. Public Const DIAMOND_FULL_MODE2 = 3          ' more strong (slow)
  1653. Public Const DIAMOND_LITE_MODE1 = 2          ' strongest (fast)
  1654. Public Const DIAMOND_LITE_MODE2 = 4          ' strong (fastest)
  1655.  
  1656. Public Const RUBY_MODE_MINIMUM = 1           ' speed is of the essence, security secondary.
  1657. Public Const RUBY_MODE_DESK_LOCK = 2         ' reasonable compromise of speed vs security.
  1658. Public Const RUBY_MODE_DEAD_BOLT = 4         ' default = probably good enough for most things.
  1659. Public Const RUBY_MODE_PORTABLE_SAFE = 5     ' security is more important than speed.
  1660. Public Const RUBY_MODE_ANCHORED_SAFE = 8     ' speed isn't much of a concern.
  1661. Public Const RUBY_MODE_BANK_VAULT = 10       ' your pentium has nothing better to do, anyway.
  1662. Public Const RUBY_MODE_FORT_KNOX = 16        ' be cool.
  1663.  
  1664. Declare Function cDESdecryptFile Lib "t2win-32.dll" (ByVal FileIn As String, ByVal FileOut As String, Key As String) As Long
  1665. Declare Function cDESencryptFile Lib "t2win-32.dll" (ByVal FileIn As String, ByVal FileOut As String, Key As String) As Long
  1666. Declare Function cDIAMONDdecryptFile Lib "t2win-32.dll" (ByVal FileIn As String, ByVal FileOut As String, Key As String, ByVal Mode As Integer) As Long
  1667. Declare Function cDIAMONDencryptFile Lib "t2win-32.dll" (ByVal FileIn As String, ByVal FileOut As String, Key As String, ByVal Mode As Integer) As Long
  1668. Declare Function cIDEAdecryptFile Lib "t2win-32.dll" (ByVal FileIn As String, ByVal FileOut As String, Key As String) As Long
  1669. Declare Function cIDEAencryptFile Lib "t2win-32.dll" (ByVal FileIn As String, ByVal FileOut As String, Key As String) As Long
  1670. Declare Function cRUBYdecryptFile Lib "t2win-32.dll" (ByVal FileIn As String, ByVal FileOut As String, Key As String, ByVal Mode As Integer) As Long
  1671. Declare Function cRUBYencryptFile Lib "t2win-32.dll" (ByVal FileIn As String, ByVal FileOut As String, Key As String, ByVal Mode As Integer) As Long
  1672.  
  1673. ' media ID - volume
  1674.  
  1675. '  structure for get/set Media ID
  1676. Type tagMEDIAID
  1677.    VolumeName           As String
  1678.    VolumeSerialNumber   As Long
  1679.    SystemName           As String
  1680.    MaxNameLength        As Long
  1681.    FileSystemFlags      As Long
  1682. End Type
  1683.  
  1684. ' structure for get/set DOS Media ID
  1685. Type tagDOSMEDIAID
  1686.    InfoLevel            As String * 2     'use cCVI for integer conversion
  1687.    SerialNumber         As String * 4     'use cCVL for long conversion
  1688.    VolLabel             As String * 11
  1689.    FileSysType          As String * 8
  1690. End Type
  1691.  
  1692. Declare Function cGetMediaID Lib "t2win-32.dll" (ByVal nDrive As String, MEDIAID As tagMEDIAID) As Integer
  1693. Declare Function cGetVolumeLabel Lib "t2win-32.dll" (ByVal nDrive As String) As String
  1694. Declare Function cSetVolumeLabel Lib "t2win-32.dll" (ByVal nDrive As String, ByVal nVolumeLabel As String) As Integer
  1695. Declare Function cDOSGetMediaID Lib "t2win-32.dll" (ByVal nDrive As String, DOSMEDIAID As tagDOSMEDIAID) As Integer
  1696. Declare Function cDOSSetMediaID Lib "t2win-32.dll" (ByVal nDrive As String, DOSMEDIAID As tagDOSMEDIAID) As Integer
  1697.  
  1698. ' network
  1699.  
  1700. Public Const ADAPTER_NO_ERROR = -1
  1701. Public Const ADAPTER_CANT_LOAD_APIDLL = 1
  1702. Public Const ADAPTER_CANT_FIND_ENTRYPOINT = 2
  1703. Public Const ADAPTER_CANT_BE_ENUMERATED = 3
  1704. Public Const ADAPTER_BAD_NUMBER = 4
  1705. Public Const ADAPTER_CANT_BE_RESETED = 5
  1706. Public Const ADAPTER_CANT_BE_READ = 6
  1707.  
  1708. Declare Function cGetNetConnection Lib "t2win-32.dll" (ByVal lpDrive As String, iErrorCode As Integer) As String
  1709. Declare Function cGetNetUser Lib "t2win-32.dll" (iErrorCode As Integer) As String
  1710. Declare Function cGetNetNumberOfAdapter Lib "t2win-32.dll" (iErrorCode As Integer) As Integer
  1711. Declare Function cGetNetAdapterNumber Lib "t2win-32.dll" (ByVal iLanAdapter As Integer, iErrorCode As Integer) As Integer
  1712. Declare Function cGetNetAdapterMacAddress Lib "t2win-32.dll" (ByVal iLanAdapter As Integer, ByVal iFormat As Integer, iErrorCode As Integer) As String
  1713. 'Declare Function cNetPing Lib "t2win-32.dll" (ByVal sHostName As String, iErrorCode As Integer) As Long
  1714. 'Declare Function cNetEnumConnections Lib "t2win-32.dll" (iErrorCode As Integer) As String
  1715.  
  1716. ' multi-language message box - input box
  1717.  
  1718. '  definition for message position
  1719. Public Const MB_MESSAGE_LEFT = 0
  1720. Public Const MB_MESSAGE_CENTER = 8192
  1721. Public Const MB_MESSAGE_RIGHT = 16384
  1722.  
  1723. '  definition for timeout management
  1724. Public Const MB_TIMEOUT_2 = 32768
  1725. Public Const MB_TIMEOUT_4 = 2 * MB_TIMEOUT_2
  1726. Public Const MB_TIMEOUT_8 = 2 * MB_TIMEOUT_4
  1727. Public Const MB_TIMEOUT_16 = 2 * MB_TIMEOUT_8
  1728.  
  1729. Public Const MB_TIMEOUT_6 = MB_TIMEOUT_2 Or MB_TIMEOUT_4
  1730. Public Const MB_TIMEOUT_10 = MB_TIMEOUT_2 Or MB_TIMEOUT_8
  1731. Public Const MB_TIMEOUT_12 = MB_TIMEOUT_4 Or MB_TIMEOUT_8
  1732. Public Const MB_TIMEOUT_14 = MB_TIMEOUT_2 Or MB_TIMEOUT_4 Or MB_TIMEOUT_8
  1733. Public Const MB_TIMEOUT_18 = MB_TIMEOUT_2 Or MB_TIMEOUT_16
  1734. Public Const MB_TIMEOUT_20 = MB_TIMEOUT_4 Or MB_TIMEOUT_16
  1735. Public Const MB_TIMEOUT_22 = MB_TIMEOUT_2 Or MB_TIMEOUT_4 Or MB_TIMEOUT_16
  1736. Public Const MB_TIMEOUT_24 = MB_TIMEOUT_8 Or MB_TIMEOUT_16
  1737. Public Const MB_TIMEOUT_26 = MB_TIMEOUT_2 Or MB_TIMEOUT_8 Or MB_TIMEOUT_16
  1738. Public Const MB_TIMEOUT_28 = MB_TIMEOUT_4 Or MB_TIMEOUT_8 Or MB_TIMEOUT_16
  1739. Public Const MB_TIMEOUT_30 = MB_TIMEOUT_2 Or MB_TIMEOUT_4 Or MB_TIMEOUT_8 Or MB_TIMEOUT_16
  1740.  
  1741. Public Const MB_DISPLAY_TIMEOUT = 524288
  1742. Public Const MB_NO_BUTTONS = 1048576
  1743.  
  1744. Declare Function cLngMsgBox Lib "t2win-32.dll" (ByVal nLanguage As Integer, ByVal Message As String, ByVal Button As Long, ByVal Title As String) As Integer
  1745. Declare Sub cLngBoxMsg Lib "t2win-32.dll" Alias "cLngMsgBox" (ByVal nLanguage As Integer, ByVal Message As String, ByVal Button As Long, ByVal Title As String)
  1746. Declare Function cLngInpBox Lib "t2win-32.dll" (ByVal nLanguage As Integer, ByVal Message As String, ByVal Title As String, ByVal Default As String) As String
  1747. Declare Sub cLngSysMenu Lib "t2win-32.dll" (ByVal nLanguage As Integer, ByVal hWnd As Long)
  1748.  
  1749. ' desktop
  1750.  
  1751. Declare Sub cLoadDesktopBackground Lib "t2win-32.dll" (ByVal FileName As String, ByVal Tile As Integer)
  1752.  
  1753. ' registry
  1754.  
  1755. Public Const RK_NO_ERROR = -1
  1756. Public Const RK_KEY_IS_EMPTY = 1
  1757. Public Const RK_UNABLE_TO_CREATE_KEY = 2
  1758. Public Const RK_UNABLE_TO_OPEN_KEY = 3
  1759. Public Const RK_UNKNOWN_DISPOSITION = 4
  1760. Public Const RK_CANNOT_SET_THE_VALUE = 5
  1761. Public Const RK_UNABLE_TO_QUERY_KEY = 6
  1762.  
  1763. Public Const RK_HKEY_CLASSES_ROOT = 1
  1764. Public Const RK_HKEY_CURRENT_USER = 2
  1765. Public Const RK_HKEY_LOCAL_MACHINE = 3
  1766. Public Const RK_HKEY_USERS = 4
  1767. Public Const RK_HKEY_PERFORMANCE_DATA = 5
  1768. Public Const RK_HKEY_CURRENT_CONFIG = 6
  1769. Public Const RK_HKEY_DYN_DATA = 7
  1770.  
  1771. ' error codes for GetAllSettings
  1772.  
  1773. Public Const GET_ALL_BAD_DIMENSION = 0
  1774. Public Const GET_ALL_CANT_OPEN_SECTION = -1
  1775. Public Const GET_ALL_NOT_ENOUGH_ELEMENT = -2
  1776.  
  1777. Type tagREGISTRYKEYINFO
  1778.    lSubKeys             As Long
  1779.    lMaxSubKeyLen        As Long
  1780.    lValues              As Long
  1781.    lMaxValueNameLen     As Long
  1782.    lMaxValueLen         As Long
  1783.    sInfoInStr           As String
  1784. End Type
  1785.  
  1786. Declare Function cPutRegistry Lib "t2win-32.dll" (ByVal lpSection As String, ByVal lpKey As String, ByVal lpValue As String) As Integer
  1787. Declare Function cGetRegistry Lib "t2win-32.dll" (ByVal lpSection As String, ByVal lpKey As String, ByVal lpDefault As String) As String
  1788. Declare Function cKillRegistry Lib "t2win-32.dll" (ByVal lpSection As String, ByVal lpKey As String) As Integer
  1789. Declare Function cPutRegistryExt Lib "t2win-32.dll" (ByVal KeyType As Integer, ByVal lpSection As String, ByVal lpKey As String, ByVal lpValue As String) As Integer
  1790. Declare Function cGetRegistryExt Lib "t2win-32.dll" (ByVal KeyType As Integer, ByVal lpSection As String, ByVal lpKey As String, ByVal lpDefault As String) As String
  1791. Declare Function cKillRegistryExt Lib "t2win-32.dll" (ByVal KeyType As Integer, ByVal lpSection As String, ByVal lpKey As String) As Integer
  1792.  
  1793. Declare Function cGetAllSettings Lib "t2win-32.dll" (Strarray() As String, ByVal lpSection As String) As Integer
  1794. Declare Function cRegistryKeyInfo Lib "t2win-32.dll" (ByVal lpSection As String, REGISTRYKEYINFO As tagREGISTRYKEYINFO) As Integer
  1795.  
  1796. ' bitmap
  1797.  
  1798. Public Const DIB_SAVE_WINDOW = True
  1799. Public Const DIB_SAVE_CLIENT = False
  1800.  
  1801. Type tagRECT
  1802.    Left                 As Long
  1803.    Top                  As Long
  1804.    Right                As Long
  1805.    Bottom               As Long
  1806. End Type
  1807.  
  1808. Declare Function cDIBSaveScreen Lib "t2win-32.dll" (ByVal lpFilename As String) As Integer
  1809. Declare Function cDIBSaveWindow Lib "t2win-32.dll" (ByVal hWnd As Long, ByVal SaveArea As Integer, ByVal lpFilename As String) As Integer
  1810. Declare Function cDisplaySplash Lib "t2win-32.dll" (ByVal lpFilename As String, ByVal MinimumTimeToStay As Integer, ByVal AutoDestruction As Integer) As Long
  1811. Declare Function cDestroySplash Lib "t2win-32.dll" (ByVal hWnd As Long) As Integer
  1812. Declare Function cShadeRect Lib "t2win-32.dll" (ByVal hDC As Long, lpRect As tagRECT) As Integer
  1813. Declare Function cTileBitmapOnWindow Lib "t2win-32.dll" (ByVal hWnd As Long, ByVal lpFilename As String) As Integer
  1814.  
  1815. ' hook keyboard and mouse
  1816.  
  1817. Public Const LOCK_MOUSE_LCLICK = 1
  1818. Public Const LOCK_MOUSE_MCLICK = 2
  1819. Public Const LOCK_MOUSE_RCLICK = 4
  1820. Public Const LOCK_MOUSE_ALL_CLICK = LOCK_MOUSE_LCLICK Or LOCK_MOUSE_MCLICK Or LOCK_MOUSE_RCLICK
  1821.  
  1822. Declare Function cInstallHookKeyboard Lib "t2win-32.dll" (ByVal InstallRemove As Integer) As Integer
  1823. Declare Function cLockKeyboard Lib "t2win-32.dll" (ByVal LockUnlock As Integer, ByVal SpecialUnlockKey As Integer) As Integer
  1824. Declare Function cLockMouse Lib "t2win-32.dll" (ByVal LockUnlock As Integer, ByVal ClickToBeHooked As Integer) As Integer
  1825.  
  1826. ' printer
  1827.  
  1828. Public Const EPJ_SUCCESS = -1
  1829. Public Const EPJ_PRINTER_NAME_EMPTY = 1
  1830. Public Const EPJ_CANT_OPEN_PRINTER = 2
  1831. Public Const EPJ_STRANGE_ERROR = 3
  1832. Public Const EPJ_CANT_ENUMERATE_MORE_JOBS = 4
  1833.  
  1834. ' error codes for cEnumPrinters1, cEnumPrinters2 and cEnumPrinters5
  1835. Public Const EP_SUCCESS = -1
  1836. Public Const EP_STRANGE_ERROR = 1
  1837. Public Const EP_CANT_ENUMERATE_MORE_PRINTERS = 2
  1838. Public Const EP_SERVER_NAME_IS_EMPTY = 3
  1839.  
  1840. Public Const JOB_STATUS_PAUSED = &H1
  1841. Public Const JOB_STATUS_ERROR = &H2
  1842. Public Const JOB_STATUS_DELETING = &H4
  1843. Public Const JOB_STATUS_SPOOLING = &H8
  1844. Public Const JOB_STATUS_PRINTING = &H10
  1845. Public Const JOB_STATUS_OFFLINE = &H20
  1846. Public Const JOB_STATUS_PAPEROUT = &H40
  1847. Public Const JOB_STATUS_PRINTED = &H80
  1848. Public Const JOB_STATUS_DELETED = &H100
  1849. Public Const JOB_STATUS_BLOCKED_DEVQ = &H200
  1850. Public Const JOB_STATUS_USER_INTERVENTION = &H400
  1851.  
  1852. Type tagJOBINFO
  1853.    sPrinterName         As String      'name of the printer for which the job is spooled
  1854.    sMachineName         As String      'name of the machine that created the print job
  1855.    sUserName            As String      'name of the user who owns the print job
  1856.    sDocument            As String      'name of the print job (for example, "MS-WORD: Review.doc")
  1857.    lJobId               As Long        'job identifier value
  1858.    lStatus              As Long        'job status (multiple OR of JOB_STATUS_x)
  1859.    lPriority            As Long        'job priority (1 : minimum; 99 : maximum)
  1860.    lPosition            As Long        'job's position in the print queue
  1861.    lStartTime           As Long        'earliest time that the job can be printed
  1862.    lUntilTime           As Long        'latest time that the job can be printed
  1863.    lTotalPages          As Long        'number of pages required for the job
  1864.    lSize                As Long        'size, in bytes, of the job
  1865.    lTime                As Long        'total time, in seconds, that has elapsed since the job began printing
  1866.    lPagesPrinted        As Long        'number of pages that have printed
  1867.    wYear                As Integer     'year of the job submitted
  1868.    wMonth               As Integer     'month of the job submitted
  1869.    wDay                 As Integer     'day of the job submitted
  1870.    wHour                As Integer     'hour of the job submitted
  1871.    wMinute              As Integer     'minute of the job submitted
  1872.    wSecond              As Integer     'second of the job submitted
  1873. End Type
  1874.  
  1875. Type tagPRINTER1
  1876.    sDescription         As String      'description of the printer
  1877.    sPrinterName         As String      'name of the printer
  1878.    sComment             As String      'brief description of the printer
  1879. End Type
  1880.  
  1881. Type tagPRINTER2
  1882.    sPrinterName         As String      'name of the printer
  1883.    sShareName           As String      'name of the sharepoint of the printer
  1884.    sComment             As String      'brief description of the printer
  1885. End Type
  1886.  
  1887. Type tagPRINTER5
  1888.    sPrinterName         As String      'name of the printer
  1889.    sPortName            As String      'port(s) used to transmit data to the printer
  1890. End Type
  1891.  
  1892. ' error codes for cGetPrinterX, cSetPrinterX
  1893. Public Const SP_SUCCESS = -1
  1894. Public Const SP_PRINTER_NAME_EMPTY = 1
  1895. Public Const SP_CANT_OPEN_PRINTER = 2
  1896. Public Const SP_CANT_GET_PRINTER_PASS1 = 3
  1897. Public Const SP_CANT_ALLOCATE_MEMORY = 4
  1898. Public Const SP_CANT_LOCK_MEMORY = 5
  1899. Public Const SP_CANT_GET_PRINTER_PASS2 = 6
  1900. Public Const SP_CANT_UPDATE_DRIVER = 7
  1901. Public Const SP_CANT_SET_PRINTER = 8
  1902. Public Const SP_COMMAND_NOT_SUPPORTED = 9
  1903.  
  1904. ' codes for SetPrinterDefaultSource
  1905. Public Const SP_SOURCE_FIRST = 1
  1906. Public Const SP_SOURCE_UPPER = 1
  1907. Public Const SP_SOURCE_ONLYONE = 1
  1908. Public Const SP_SOURCE_LOWER = 2
  1909. Public Const SP_SOURCE_MIDDLE = 3
  1910. Public Const SP_SOURCE_MANUAL = 4
  1911. Public Const SP_SOURCE_ENVELOPE = 5
  1912. Public Const SP_SOURCE_ENVMANUAL = 6
  1913. Public Const SP_SOURCE_AUTO = 7
  1914. Public Const SP_SOURCE_TRACTOR = 8
  1915. Public Const SP_SOURCE_SMALLFMT = 9
  1916. Public Const SP_SOURCE_LARGEFMT = 10
  1917. Public Const SP_SOURCE_LARGECAPACITY = 11
  1918. Public Const SP_SOURCE_CASSETTE = 14
  1919. Public Const SP_SOURCE_FORMSOURCE = 15
  1920. Public Const SP_SOURCE_LAST = SP_SOURCE_FORMSOURCE
  1921. Public Const SP_SOURCE_USER = 256                ' device specific bins start here
  1922.  
  1923. ' codes for SetPrinterDitherType
  1924. Public Const SP_DITHER_NONE = 1              ' No dithering
  1925. Public Const SP_DITHER_COARSE = 2            ' Dither with a coarse brush
  1926. Public Const SP_DITHER_FINE = 3              ' Dither with a fine brush
  1927. Public Const SP_DITHER_LINEART = 4           ' LineArt dithering
  1928. Public Const SP_DITHER_GRAYSCALE = 5         ' Device does grayscaling
  1929. Public Const SP_DITHER_USER = 256            ' Device-specific dithers start here
  1930.  
  1931. ' codes for SetPrinterOrientation
  1932. Public Const SP_ORIENTATION_PORTRAIT = 1     ' Portrait
  1933. Public Const SP_ORIENTATION_LANDSCAPE = 2    ' Landscape
  1934.  
  1935. ' codes for GetPrinterPaper
  1936. Public Const DM_SIZE_FIRST = 1
  1937. Public Const DM_SIZE_LETTER = 1                    ' Letter 8 1/2 x 11 in
  1938. Public Const DM_SIZE_LETTERSMALL = 2               ' Letter Small 8 1/2 x 11 in
  1939. Public Const DM_SIZE_TABLOID = 3                   ' Tabloid 11 x 17 in
  1940. Public Const DM_SIZE_LEDGER = 4                    ' Ledger 17 x 11 in
  1941. Public Const DM_SIZE_LEGAL = 5                     ' Legal 8 1/2 x 14 in
  1942. Public Const DM_SIZE_STATEMENT = 6                 ' Statement 5 1/2 x 8 1/2 in
  1943. Public Const DM_SIZE_EXECUTIVE = 7                 ' Executive 7 1/4 x 10 1/2 in
  1944. Public Const DM_SIZE_A3 = 8                        ' A3 297 x 420 mm
  1945. Public Const DM_SIZE_A4 = 9                        ' A4 210 x 297 mm
  1946. Public Const DM_SIZE_A4SMALL = 10                  ' A4 Small 210 x 297 mm
  1947. Public Const DM_SIZE_A5 = 11                       ' A5 148 x 210 mm
  1948. Public Const DM_SIZE_B4 = 12                       ' B4 (JIS) 250 x 354
  1949. Public Const DM_SIZE_B5 = 13                       ' B5 (JIS) 182 x 257 mm
  1950. Public Const DM_SIZE_FOLIO = 14                    ' Folio 8 1/2 x 13 in
  1951. Public Const DM_SIZE_QUARTO = 15                   ' Quarto 215 x 275 mm
  1952. Public Const DM_SIZE_10X14 = 16                    ' 10x14 in
  1953. Public Const DM_SIZE_11X17 = 17                    ' 11x17 in
  1954. Public Const DM_SIZE_NOTE = 18                     ' Note 8 1/2 x 11 in
  1955. Public Const DM_SIZE_ENV_9 = 19                    ' Envelope #9 3 7/8 x 8 7/8
  1956. Public Const DM_SIZE_ENV_10 = 20                   ' Envelope #10 4 1/8 x 9 1/2
  1957. Public Const DM_SIZE_ENV_11 = 21                   ' Envelope #11 4 1/2 x 10 3/8
  1958. Public Const DM_SIZE_ENV_12 = 22                   ' Envelope #12 4 \276 x 11
  1959. Public Const DM_SIZE_ENV_14 = 23                   ' Envelope #14 5 x 11 1/2
  1960. Public Const DM_SIZE_CSHEET = 24                   ' C size sheet
  1961. Public Const DM_SIZE_DSHEET = 25                   ' D size sheet
  1962. Public Const DM_SIZE_ESHEET = 26                   ' E size sheet
  1963. Public Const DM_SIZE_ENV_DL = 27                   ' Envelope DL 110 x 220mm
  1964. Public Const DM_SIZE_ENV_C5 = 28                   ' Envelope C5 162 x 229 mm
  1965. Public Const DM_SIZE_ENV_C3 = 29                   ' Envelope C3  324 x 458 mm
  1966. Public Const DM_SIZE_ENV_C4 = 30                   ' Envelope C4  229 x 324 mm
  1967. Public Const DM_SIZE_ENV_C6 = 31                   ' Envelope C6  114 x 162 mm
  1968. Public Const DM_SIZE_ENV_C65 = 32                  ' Envelope C65 114 x 229 mm
  1969. Public Const DM_SIZE_ENV_B4 = 33                   ' Envelope B4  250 x 353 mm
  1970. Public Const DM_SIZE_ENV_B5 = 34                   ' Envelope B5  176 x 250 mm
  1971. Public Const DM_SIZE_ENV_B6 = 35                   ' Envelope B6  176 x 125 mm
  1972. Public Const DM_SIZE_ENV_ITALY = 36                ' Envelope 110 x 230 mm
  1973. Public Const DM_SIZE_ENV_MONARCH = 37              ' Envelope Monarch 3.875 x 7.5 in
  1974. Public Const DM_SIZE_ENV_PERSONAL = 38             ' 6 3/4 Envelope 3 5/8 x 6 1/2 in
  1975. Public Const DM_SIZE_FANFOLD_US = 39               ' US Std Fanfold 14 7/8 x 11 in
  1976. Public Const DM_SIZE_FANFOLD_STD_GERMAN = 40       ' German Std Fanfold 8 1/2 x 12 in
  1977. Public Const DM_SIZE_FANFOLD_LGL_GERMAN = 41       ' German Legal Fanfold 8 1/2 x 13 in
  1978. Public Const DM_SIZE_ISO_B4 = 42                   ' B4 (ISO) 250 x 353 mm
  1979. Public Const DM_SIZE_JAPANESE_POSTCARD = 43        ' Japanese Postcard 100 x 148 mm
  1980. Public Const DM_SIZE_9X11 = 44                     ' 9 x 11 in
  1981. Public Const DM_SIZE_10X11 = 45                    ' 10 x 11 in
  1982. Public Const DM_SIZE_15X11 = 46                    ' 15 x 11 in
  1983. Public Const DM_SIZE_ENV_INVITE = 47               ' Envelope Invite 220 x 220 mm
  1984. Public Const DM_SIZE_RESERVED_48 = 48              ' RESERVED--DO NOT USE
  1985. Public Const DM_SIZE_RESERVED_49 = 49              ' RESERVED--DO NOT USE
  1986. Public Const DM_SIZE_LETTER_EXTRA = 50             ' Letter Extra 9 \275 x 12 in
  1987. Public Const DM_SIZE_LEGAL_EXTRA = 51              ' Legal Extra 9 \275 x 15 in
  1988. Public Const DM_SIZE_TABLOID_EXTRA = 52            ' Tabloid Extra 11.69 x 18 in
  1989. Public Const DM_SIZE_A4_EXTRA = 53                 ' A4 Extra 9.27 x 12.69 in
  1990. Public Const DM_SIZE_LETTER_TRANSVERSE = 54        ' Letter Transverse 8 \275 x 11 in
  1991. Public Const DM_SIZE_A4_TRANSVERSE = 55            ' A4 Transverse 210 x 297 mm
  1992. Public Const DM_SIZE_LETTER_EXTRA_TRANSVERSE = 56  ' Letter Extra Transverse 9\275 x 12 in
  1993. Public Const DM_SIZE_A_PLUS = 57                   ' SuperA/SuperA/A4 227 x 356 mm
  1994. Public Const DM_SIZE_B_PLUS = 58                   ' SuperB/SuperB/A3 305 x 487 mm
  1995. Public Const DM_SIZE_LETTER_PLUS = 59              ' Letter Plus 8.5 x 12.69 in
  1996. Public Const DM_SIZE_A4_PLUS = 60                  ' A4 Plus 210 x 330 mm
  1997. Public Const DM_SIZE_A5_TRANSVERSE = 61            ' A5 Transverse 148 x 210 mm
  1998. Public Const DM_SIZE_B5_TRANSVERSE = 62            ' B5 (JIS) Transverse 182 x 257 mm
  1999. Public Const DM_SIZE_A3_EXTRA = 63                 ' A3 Extra 322 x 445 mm
  2000. Public Const DM_SIZE_A5_EXTRA = 64                 ' A5 Extra 174 x 235 mm
  2001. Public Const DM_SIZE_B5_EXTRA = 65                 ' B5 (ISO) Extra 201 x 276 mm
  2002. Public Const DM_SIZE_A2 = 66                       ' A2 420 x 594 mm
  2003. Public Const DM_SIZE_A3_TRANSVERSE = 67            ' A3 Transverse 297 x 420 mm
  2004. Public Const DM_SIZE_A3_EXTRA_TRANSVERSE = 68      ' A3 Extra Transverse 322 x 445 mm
  2005. Public Const DM_SIZE_LAST = DM_SIZE_A3_EXTRA_TRANSVERSE
  2006. Public Const DM_SIZE_USER = 256
  2007.  
  2008. ' codes for SetPrinterQuality
  2009. Public Const SP_QUALITY_DRAFT = -1
  2010. Public Const SP_QUALITY_LOW = -2
  2011. Public Const SP_QUALITY_MEDIUM = -3
  2012. Public Const SP_QUALITY_HIGH = -4
  2013.  
  2014. Declare Function cEnumPrinterJobs Lib "t2win-32.dll" (ByVal sPrinterName As String, JOBINFO As tagJOBINFO, ByVal iFirstNext As Integer) As Integer
  2015. Declare Function cEnumPrinters1 Lib "t2win-32.dll" (PRINTER1 As tagPRINTER1, ByVal iFirstNext As Integer) As Integer
  2016. Declare Function cEnumPrinters2 Lib "t2win-32.dll" (ByVal sServerName As String, PRINTER2 As tagPRINTER2, ByVal iFirstNext As Integer) As Integer
  2017. Declare Function cEnumPrinters5 Lib "t2win-32.dll" (PRINTER5 As tagPRINTER5, ByVal iFirstNext As Integer) As Integer
  2018. Declare Function cGetPrinterCopies Lib "t2win-32.dll" (ByVal sPrinterName As String, iCopies As Integer) As Integer
  2019. Declare Function cGetPrinterDefaultSource Lib "t2win-32.dll" (ByVal sPrinterName As String, iDefaultSource As Integer) As Integer
  2020. Declare Function cGetPrinterDitherType Lib "t2win-32.dll" (ByVal sPrinterName As String, iDitherType As Integer) As Integer
  2021. Declare Function cGetPrinterOrientation Lib "t2win-32.dll" (ByVal sPrinterName As String, iOrientation As Integer) As Integer
  2022. Declare Function cGetPrinterQuality Lib "t2win-32.dll" (ByVal sPrinterName As String, iQuality As Integer) As Integer
  2023. Declare Function cGetPrinterPaper Lib "t2win-32.dll" (ByVal sPrinterName As String, iSize As Integer) As Integer
  2024. Declare Function cPrinterBins Lib "t2win-32.dll" (ByVal sPrinterName As String, ByVal sPrinterPort As String) As Integer
  2025. Declare Function cPrinterHeight Lib "t2win-32.dll" (ByVal hDC As Long) As Single
  2026. Declare Function cPrinterOffsetLeft Lib "t2win-32.dll" (ByVal hDC As Long) As Single
  2027. Declare Function cPrinterOffsetTop Lib "t2win-32.dll" (ByVal hDC As Long) As Single
  2028. Declare Function cPrinterWidth Lib "t2win-32.dll" (ByVal hDC As Long) As Single
  2029. Declare Function cSetPrinterCopies Lib "t2win-32.dll" (ByVal sPrinterName As String, ByVal iCopies As Integer) As Integer
  2030. Declare Function cSetPrinterDefault Lib "t2win-32.dll" (ByVal sPrinterName As String) As Integer
  2031. Declare Function cSetPrinterDefaultSource Lib "t2win-32.dll" (ByVal sPrinterName As String, ByVal iDefaultSource As Integer) As Integer
  2032. Declare Function cSetPrinterDitherType Lib "t2win-32.dll" (ByVal sPrinterName As String, ByVal iDitherType As Integer) As Integer
  2033. Declare Function cSetPrinterOrientation Lib "t2win-32.dll" (ByVal sPrinterName As String, ByVal iOrientation As Integer) As Integer
  2034. Declare Function cSetPrinterQuality Lib "t2win-32.dll" (ByVal sPrinterName As String, ByVal iQuality As Integer) As Integer
  2035.  
  2036. ' open files
  2037.  
  2038. Public Const ENUMERATE_ALL_OPEN_FILES = True
  2039. Public Const ENUMERATE_ONLY_OPEN_UNMOVABLE_FILES = False
  2040.  
  2041. Public Const NO_ERROR_OPEN_FILES = True
  2042. Public Const NO_MORE_OPEN_FILES = 0
  2043. Public Const ERROR_LOCK_LOGICAL_VOLUME = 1
  2044. Public Const ERROR_ENUMERATE_OPEN_FILES = 2
  2045. Public Const ERROR_UNLOCK_LOGICAL_VOLUME = 3
  2046. Public Const ERROR_CAN_CONVERT_TO_LONG_NAME = 4
  2047.  
  2048. Declare Function cEnumOpenFiles Lib "t2win-32.dll" (ByVal nDrive As String, ByVal EnumType As Integer, ByVal FirstNext As Integer, OpenFileName As String, OpenFileMode As Long, OpenFileType As Long) As Integer
  2049.  
  2050. ' Mail and News processing
  2051.  
  2052. Public Const BTOA_CANT_OPEN_SOURCE = -1
  2053. Public Const BTOA_CANT_OPEN_TARGET = -2
  2054.  
  2055. Declare Function cBtoA Lib "t2win-32.dll" (ByVal FileIn As String, ByVal FileOut As String) As Long
  2056. Declare Function cAtoB Lib "t2win-32.dll" (ByVal FileIn As String) As Long
  2057.  
  2058. ' constants for error processing
  2059.  
  2060. Public Const MNRET_OK = 0       'everything went fine
  2061. Public Const MNRET_IOERR = 1    'I/O Error - examine errno
  2062. Public Const MNRET_NOMEM = 2    'not enough memory
  2063. Public Const MNRET_ILLVAL = 3   'illegal value for operation
  2064. Public Const MNRET_NODATA = 4   'decoder didn't find any data
  2065. Public Const MNRET_NOEND = 5    'encoded data wasn't ended properly
  2066. Public Const MNRET_UNSUP = 6    'unsupported function (encoding)
  2067. Public Const MNRET_EXISTS = 7   'file exists (decoding)
  2068. Public Const MNRET_CONT = 8     'continue -- special from ScanPart
  2069. Public Const MNRET_CANCEL = 9   'operation canceled
  2070.  
  2071. ' constants for OptionNO in cMNGetOption and cMNSetOption
  2072.  
  2073. Public Const MNOPT_VERSION = 0         'version number MAJOR.MINORplPATCH (ro)
  2074. Public Const MNOPT_FAST = 1            'assumes only one part per file
  2075. Public Const MNOPT_DUMBNESS = 2        'switch off the program's intelligence
  2076. Public Const MNOPT_BRACKPOL = 3        'give numbers in [] higher precendence
  2077. Public Const MNOPT_VERBOSE = 4         'generate informative messages
  2078. Public Const MNOPT_DESPERATE = 5       'try to decode incomplete files
  2079. Public Const MNOPT_IGNREPLY = 6        'ignore RE:plies (off by default)
  2080. Public Const MNOPT_OVERWRITE = 7       'whether it's OK to overwrite ex. files
  2081. Public Const MNOPT_SAVEPATH = 8        'prefix to save-files on disk
  2082. Public Const MNOPT_IGNMODE = 9         'ignore the original file mode
  2083. Public Const MNOPT_DEBUG = 10          'print messages with FILE/LINE info
  2084. Public Const MNOPT_ERRNO = 14          'get last error code for MNRET_IOERR (ro)
  2085. Public Const MNOPT_PROGRESS = 15       'retrieve progress information
  2086. Public Const MNOPT_USETEXT = 16        'handle text messages
  2087. Public Const MNOPT_PREAMB = 17         'handle Mime preambles/epilogues
  2088. Public Const MNOPT_TINYB64 = 18        'detect short B64 outside of Mime
  2089. Public Const MNOPT_ENCEXT = 19         'extension for single-part encoded files
  2090.  
  2091. ' constants for TypeOfEncoding in cMNEncode and cMNWalkInList
  2092.  
  2093. Public Const MN_UU_ENCODED = 1         'UUencoded data
  2094. Public Const MN_B64ENCODED = 2         'Mime-Base64 data
  2095. Public Const MN_XX_ENCODED = 3         'XXencoded data
  2096. Public Const MN_BH_ENCODED = 4         'Binhex encoded
  2097. Public Const MN_PT_ENCODED = 5         'Plain-Text encoded (MIME)
  2098. Public Const MN_QP_ENCODED = 6         'Quoted-Printable (MIME)
  2099.  
  2100. ' constants for Mime Headers in cMNEncode
  2101. Public Const MNHDR_NONE = 0            'No MIME headers (use standard headers)
  2102. Public Const MNHDR_SIMPLE = 1          'Simple MIME (no addressing)
  2103. Public Const MNHDR_MAIL = 2            'MIME E-mail format
  2104. Public Const MNHDR_NEWS = 3            'MIME News format
  2105.  
  2106. ' constants for FileState (may be OR'ed) in cMNWalkInList
  2107.  
  2108. Public Const MNSTATE_READ = 0          'Read in, but not further processed
  2109. Public Const MNSTATE_MISPART = 1       'Missing Part(s) detected
  2110. Public Const MNSTATE_NOBEGIN = 2       'No 'begin' found
  2111. Public Const MNSTATE_NOEND = 4         'No 'end' found
  2112. Public Const MNSTATE_NODATA = 8        'File does not contain valid uudata
  2113. Public Const MNSTATE_OK = 16           'All Parts found, ready to decode
  2114. Public Const MNSTATE_ERROR = 32        'Error while decoding
  2115. Public Const MNSTATE_DECODED = 64      'Successfully decoded
  2116. Public Const MNSTATE_TMPFILE = 128     'Temporary decoded file exists
  2117.  
  2118. Declare Function cMNInitialize Lib "t2win-32.dll" () As Long
  2119. Declare Function cMNShutdown Lib "t2win-32.dll" () As Long
  2120. Declare Function cMNGetOption Lib "t2win-32.dll" (ByVal OptionNo As Long, LongVal As Long, StringVal As String) As Integer
  2121. Declare Function cMNSetOption Lib "t2win-32.dll" (ByVal OptionNo As Long, ByVal LongVal As Long, ByVal StringVal As String) As Integer
  2122. Declare Function cMNEncode Lib "t2win-32.dll" (ByVal FileIn As String, ByVal FileOut As String, ByVal NameInFile As String, ByVal TypeOfEncoding As Long, ByVal linesperfile As Long, ByVal MimeHeaders As Integer, ByVal Sender As String, ByVal Receiver As String, ByVal Subject As String) As Long
  2123. Declare Function cMNLoadInList Lib "t2win-32.dll" (ByVal FileName As String, ByVal DeleteAfterDecoding As Long) As Long
  2124. Declare Function cMNCountInList Lib "t2win-32.dll" () As Long
  2125. Declare Function cMNFirstInList Lib "t2win-32.dll" (Ptr As Long) As Integer
  2126. Declare Function cMNWalkInList Lib "t2win-32.dll" (ByVal Ptr As Long, FileName As String, TypeOfEncoding As Integer, FileState As Long, NextPtr As Long) As Integer
  2127. Declare Function cMNGetSubjectInList Lib "t2win-32.dll" (ByVal Ptr As Long) As String
  2128. Declare Function cMNGetMimeIDInList Lib "t2win-32.dll" (ByVal Ptr As Long) As String
  2129. Declare Function cMNGetMimeContentInList Lib "t2win-32.dll" (ByVal Ptr As Long) As String
  2130. Declare Function cMNRenameInList Lib "t2win-32.dll" (ByVal Ptr As Long, ByVal NewFileName As String) As Integer
  2131. Declare Function cMNDecodeFromList Lib "t2win-32.dll" (ByVal Ptr As Long, FileState As Long, ErrorCodeForDecodeOperation As Long, ErrorCodeForMoveOperation As Long) As Long
  2132.  
  2133. ' math
  2134.  
  2135. Type tagCOMPLEX
  2136.    a                    As Double
  2137.    b                    As Double
  2138. End Type
  2139.  
  2140. Declare Function cCpxAdd Lib "t2win-32.dll" (z1 As tagCOMPLEX, z2 As tagCOMPLEX) As tagCOMPLEX
  2141. Declare Function cCpxSub Lib "t2win-32.dll" (z1 As tagCOMPLEX, z2 As tagCOMPLEX) As tagCOMPLEX
  2142. Declare Function cCpxMul Lib "t2win-32.dll" (z1 As tagCOMPLEX, z2 As tagCOMPLEX) As tagCOMPLEX
  2143. Declare Function cCpxDiv Lib "t2win-32.dll" (z1 As tagCOMPLEX, z2 As tagCOMPLEX) As tagCOMPLEX
  2144. Declare Function cCpxConjugue Lib "t2win-32.dll" (z1 As tagCOMPLEX) As tagCOMPLEX
  2145. Declare Function cCpxModulus Lib "t2win-32.dll" (z1 As tagCOMPLEX) As Double
  2146. Declare Function cCpxArgument Lib "t2win-32.dll" (z1 As tagCOMPLEX) As Double
  2147. Declare Function cCpxPowerN Lib "t2win-32.dll" (z1 As tagCOMPLEX, ByVal n As Integer) As tagCOMPLEX
  2148. Declare Function cCpxSqrt Lib "t2win-32.dll" (z1 As tagCOMPLEX) As tagCOMPLEX
  2149.  
  2150. Declare Function cRootN Lib "t2win-32.dll" (ByVal x As Double, ByVal n As Integer, ByVal Precision As Integer, Iteration As Long) As Double
  2151. Declare Function cRound Lib "t2win-32.dll" (ByVal x As Double, ByVal Precision As Integer) As Double
  2152. Declare Function cRoundNearest Lib "t2win-32.dll" (ByVal x As Double, ByVal NearestValue As Long) As Double
  2153.  
  2154. Declare Function cGreatCommonDivisor Lib "t2win-32.dll" (ByVal Value1 As Long, ByVal Value2 As Long) As Long
  2155. Declare Function cRotate Lib "t2win-32.dll" (ByVal Value As Long, ByVal Rotation As Integer) As Long
  2156. Declare Function cSortDigits Lib "t2win-32.dll" (ByVal Value As Long) As Long
  2157. Declare Function cSumDigits Lib "t2win-32.dll" (ByVal Value As Long) As Long
  2158. Declare Function cSumDigitsAlt Lib "t2win-32.dll" (ByVal Value As Long) As Long
  2159. Declare Function cSumDivisors Lib "t2win-32.dll" (ByVal Value As Long) As Long
  2160.  
  2161. ' Remote Access Service
  2162.  
  2163. ' error codes for RasGetCountryInfo
  2164. Public Const RAS_SUCCESS = -1
  2165. Public Const RAS_CANT_ACCESS_COUNTRY = -2
  2166. Public Const RAS_NO_MORE_COUNTRY = -3
  2167.  
  2168. ' structure for RasGetCountryInfo
  2169. Type tagCOUNTRYINFO
  2170.    sCountryName         As String      'country name
  2171.    iCountryID           As Integer     'TAPI country identifier
  2172.    iCountryCode         As Integer     'country code
  2173. End Type
  2174.  
  2175. Declare Function cRasEnumDevices Lib "t2win-32.dll" (sDeviceName As String, sDeviceType As String, ByVal iFirstNext As Integer) As Integer
  2176. Declare Function cRasGetCountryInfo Lib "t2win-32.dll" (ByVal iCountry As Integer, COUNTRYINFO As tagCOUNTRYINFO, ByVal iFirstNext As Integer) As Integer
  2177.  
  2178.